ldube commented on code in PR #8929: URL: https://github.com/apache/nuttx/pull/8929#discussion_r1154880131
########## boards/arm/tiva/tm4c1294-launchpad/src/tm4c_bringup.c: ########## @@ -151,6 +152,46 @@ static void tm4c_i2ctool(void) # define tm4c_i2ctool() #endif +/**************************************************************************** + * Name: tm4c_bmi160_setup + * + * Description: + * Initialize and register the bmi160 sensor. + * + * Input Parameters: + * bus - A number identifying the I2C bus. + * + * Returned Value: + * On success, zero (OK) is returned. On failure, a negated errno value + * is returned to indicate the nature of the failure. + * + ****************************************************************************/ + +#ifdef CONFIG_SENSORS_BMI160 +static int tm4c_bmi160_setup(int bus) +{ + int ret; + struct i2c_master_s *i2c; + + /* Initialize i2c device */ + + i2c = tiva_i2cbus_initialize(bus); + if (!i2c) + { + _err("ERROR: Failed to initialize i2c%d.\n", bus); Review Comment: Why? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org