I'm learning about,, but stuck here for the moment. My question is there somebody out, that can coach me through this challenge? * BNO055_iERROR is an return value of SPI write API * "BNO055_iERROR = I2C_WRITE_READ_STRING(DEV_ADDR, * for read the data using I2C communication * Please take the below API as your reference S8 BNO055_I2C_bus_read(u8 dev_addr, u8 reg_addr, u8 *reg_data, u8 cnt) * \param cnt : The no of byte of data to be read * \param reg_data : This data read from the sensor, * \Brief: The API is used as I2C bus read * For more information please refer data sheet SPI communication: * The first read data is discarded, for that extra write operation * In the driver BNO055_SUCCESS defined as 0 * BNO055_iERROR is an return value of I2C read API * "BNO055_iERROR = I2C_WRITE_STRING(DEV_ADDR, ARRAY, CNT+1)" * Please take the below APIs as your reference for S8 BNO055_I2C_bus_write(u8 dev_addr, u8 reg_addr, u8 *reg_data, u8 cnt)įor (stringpos = BNO055_INIT_VALUE stringpos < cnt stringpos++)Īrray = * \param cnt : The no of byte of data to be write * will be used for write the value into the register * \param reg_data : It is a value hold in the array, * \param reg_addr : Address of the first register, * \param dev_addr : The device address of the sensor Below you can find the two functions as predefined : /* \Brief: The API is used as I2C bus write It needs to be setup so you can define the amount of bytes read/written. After getting into programming and c and studying/trying out it seems somehow I need to define how to do I2C read and write. It comes with a bno055.c, bno055.h and a bno055_support.c file. I bought a raspberrypi and a bno055 bosch accelerometer. First I'm noob in this stuff, but learning and really want to get this working.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |