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 FXLS8471Q by
Diff: FXLS8471Q.h
- Revision:
- 3:b1fd3a2572e2
- Parent:
- 2:6aae25fe9ab4
- Child:
- 4:b6e0c4ad3aee
--- a/FXLS8471Q.h Mon Jun 02 17:14:15 2014 +0000 +++ b/FXLS8471Q.h Mon Jun 02 17:37:44 2014 +0000 @@ -47,16 +47,15 @@ */ FXLS8471Q(PinName mosi, PinName miso, PinName scl, PinName cs); - /** - * Get XYZ axis acceleration in G's + * Get XYZ axis acceleration in G's as floating point * * @param res array where acceleration data will be stored */ void ReadXYZ(float * a); /** - * Get XYZ axis acceleration, signed 16 bit values + * Get XYZ axis acceleration as signed 16 bit values * * @param res array where acceleration data will be stored */ @@ -70,12 +69,17 @@ char getWhoAmI(void); private: + SPI _spi; - SPI _spi; DigitalOut _spi_cs; + /** + * Set the device in active mode + */ void begin( void); + void RegWrite( int reg, int * d, int len); + void RegRead( int reg, int * d, int len); };