roverSTM  UM2 2013
Projet M1 Navarro Benjamin
All Classes Files Functions Groups Pages
Public Member Functions | List of all members
ADXL345 Class Reference
Inheritance diagram for ADXL345:
I2CDevice

Public Member Functions

 ADXL345 (I2C_TypeDef *I2C_Port, uint8_t address=0xA6, uint32_t speed=100000)
 Initialize a ADXL345 in I2C. More...
 
int16x3 getRawData ()
 Get raw data. More...
 
floatx3 getGValues ()
 Get acceleration values in g. More...
 
rollpitch getRollPitch ()
 Get the roll an pitch angles in radians and degres. More...
 
- Public Member Functions inherited from I2CDevice
 I2CDevice (I2C_TypeDef *I2C_Port, uint8_t address, uint32_t speed=100000)
 Configure and enable the I2C device. More...
 
virtual ~I2CDevice ()
 Deinitialize the device. More...
 

Additional Inherited Members

- Protected Member Functions inherited from I2CDevice
void WriteRegister (uint8_t reg, uint8_t value)
 Write some data into a register. More...
 
void WriteBuffer (uint8_t reg, uint8_t *buffer, uint8_t length)
 Send a buffer of data to the device. More...
 
uint8_t ReadRegister (uint8_t reg)
 Read some data from a register. More...
 
void ReadBuffer (uint8_t reg, uint8_t *buffer, uint8_t length)
 Read a buffer of data from the device. More...
 

Constructor & Destructor Documentation

ADXL345::ADXL345 ( I2C_TypeDef *  I2C_Port,
uint8_t  address = 0xA6,
uint32_t  speed = 100000 
)

Initialize a ADXL345 in I2C.

Parameters
I2CPort
Slaveaddress
Busspeed (Hz)
Return values
None

Member Function Documentation

floatx3 ADXL345::getGValues ( )

Get acceleration values in g.

Parameters
None
Return values
gvalues (3xfloat structure)
int16x3 ADXL345::getRawData ( )

Get raw data.

Parameters
None
Return values
rawvalues (3xint16_t structure)
rollpitch ADXL345::getRollPitch ( )

Get the roll an pitch angles in radians and degres.

Parameters
None
Return values
rawvalues (rollpitch structure)

The documentation for this class was generated from the following files: