Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BMI160 by
Revision 17:0ae99e97bcf5, committed 2017-01-05
- Comitter:
- j3
- Date:
- Thu Jan 05 21:11:47 2017 +0000
- Parent:
- 16:12782f5d4aa4
- Child:
- 18:aa7eec9f0484
- 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 |
--- 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);
