lsm303: add quick accel data functions

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll 2014-09-18 16:31:58 +01:00
parent d0999cf778
commit e7a32b9882
2 changed files with 26 additions and 2 deletions

View File

@ -109,6 +109,24 @@ LSM303::getRawCoorData()
return &coor[0];
}
uint8_t
LSM303::getAccelY()
{
return accel[2];
}
uint8_t
LSM303::getAccelZ()
{
return accel[0];
}
uint8_t
LSM303::getAccelX()
{
return accel[1];
}
mraa_result_t
LSM303::getCoordinates()
{

View File

@ -110,6 +110,12 @@ class LSM303 {
*/
uint8_t* getRawCoorData();
uint8_t getAccelY();
uint8_t getAccelZ();
uint8_t getAccelX();
/**
* Get the raw accelerometer data, this will get updated when getAcceleration() is called
*/