Library for Bosch Sensortech BMI160 IMU
Dependents: MAX32630FTHR_BALANCE_BOT MPSMAX_copy MAX32630FTHR_BALANCE_BOT SELF_BALANCING_BOT
Revision 17:0ae99e97bcf5, committed 2017-01-05
- Comitter:
- j3
- Date:
- Thu Jan 05 21:11:47 2017 +0000
- Parent:
- 16:12782f5d4aa4
- Commit message:
- Updated docs for virtual fxs;
Changed in this revision
bmi160.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 12782f5d4aa4 -r 0ae99e97bcf5 bmi160.h --- a/bmi160.h Tue Dec 20 23:57:54 2016 +0000 +++ b/bmi160.h Thu Jan 05 21:11:47 2017 +0000 @@ -639,10 +639,62 @@ BMI160_I2C(I2C &i2cBus, uint8_t i2cAdrs); + ///@brief Reads a single register.\n + /// + ///On Entry: + ///@param[in] data - pointer to memory for storing read data + /// + ///On Exit: + ///@param[out] data - holds contents of read register on success + /// + ///@returns 0 on success, non 0 on failure virtual int32_t readRegister(Registers reg, uint8_t *data); + + + ///@brief Writes a single register.\n + /// + ///On Entry: + ///@param[in] data - data to write to register + /// + ///On Exit: + ///@param[out] none + /// + ///@returns 0 on success, non 0 on failure virtual int32_t writeRegister(Registers reg, const uint8_t data); + + + ///@brief Reads a block of registers.\n + ///@detail User must ensure that all registers between 'startReg' and + ///'stopReg' exist and are readable. Function reads up to, including, + ///'stopReg'.\n + /// + ///On Entry: + ///@param[in] startReg - register to start reading from + ///@param[in] stopReg - register to stop reading from + ///@param[in] data - pointer to memory for storing read data + /// + ///On Exit: + ///@param[out] data - holds contents of read registers on success + /// + ///@returns 0 on success, non 0 on failure virtual int32_t readBlock(Registers startReg, Registers stopReg, uint8_t *data); + + + ///@brief Writes a block of registers.\n + ///@detail User must ensure that all registers between 'startReg' and + ///'stopReg' exist and are writeable. Function writes up to, including, + ///'stopReg'.\n + /// + ///On Entry: + ///@param[in] startReg - register to start writing at + ///@param[in] stopReg - register to stop writing at + ///@param[in] data - pointer to data to write to registers + /// + ///On Exit: + ///@param[out] none + /// + ///@returns 0 on success, non 0 on failure virtual int32_t writeBlock(Registers startReg, Registers stopReg, const uint8_t *data); @@ -672,10 +724,63 @@ ///@returns none BMI160_SPI(SPI &spiBus, DigitalOut &cs); + + ///@brief Reads a single register.\n + /// + ///On Entry: + ///@param[in] data - pointer to memory for storing read data + /// + ///On Exit: + ///@param[out] data - holds contents of read register on success + /// + ///@returns 0 on success, non 0 on failure virtual int32_t readRegister(Registers reg, uint8_t *data); + + + ///@brief Writes a single register.\n + /// + ///On Entry: + ///@param[in] data - data to write to register + /// + ///On Exit: + ///@param[out] none + /// + ///@returns 0 on success, non 0 on failure virtual int32_t writeRegister(Registers reg, const uint8_t data); + + + ///@brief Reads a block of registers.\n + ///@detail User must ensure that all registers between 'startReg' and + ///'stopReg' exist and are readable. Function reads up to, including, + ///'stopReg'.\n + /// + ///On Entry: + ///@param[in] startReg - register to start reading from + ///@param[in] stopReg - register to stop reading from + ///@param[in] data - pointer to memory for storing read data + /// + ///On Exit: + ///@param[out] data - holds contents of read registers on success + /// + ///@returns 0 on success, non 0 on failure virtual int32_t readBlock(Registers startReg, Registers stopReg, uint8_t *data); + + + ///@brief Writes a block of registers.\n + ///@detail User must ensure that all registers between 'startReg' and + ///'stopReg' exist and are writeable. Function writes up to, including, + ///'stopReg'.\n + /// + ///On Entry: + ///@param[in] startReg - register to start writing at + ///@param[in] stopReg - register to stop writing at + ///@param[in] data - pointer to data to write to registers + /// + ///On Exit: + ///@param[out] none + /// + ///@returns 0 on success, non 0 on failure virtual int32_t writeBlock(Registers startReg, Registers stopReg, const uint8_t *data);