Beta
Dependencies: ST_INTERFACES X_NUCLEO_COMMON
Fork of X_NUCLEO_IKS01A2 by
Diff: Components/LPS22HBSensor/LPS22HBSensor.cpp
- Revision:
- 6:671fd10a51b7
- Parent:
- 1:bd2a01e81e6f
- Child:
- 9:038121268b07
diff -r 63b2b4c21092 -r 671fd10a51b7 Components/LPS22HBSensor/LPS22HBSensor.cpp --- a/Components/LPS22HBSensor/LPS22HBSensor.cpp Thu Dec 15 14:03:46 2016 +0000 +++ b/Components/LPS22HBSensor/LPS22HBSensor.cpp Tue Mar 14 13:41:32 2017 +0100 @@ -41,7 +41,7 @@ #include "mbed.h" #include "DevI2C.h" #include "LPS22HBSensor.h" -#include "LPS22HB_Driver.h" +#include "LPS22HB_driver.h" /* Class Implementation ------------------------------------------------------*/ @@ -70,7 +70,7 @@ * @param[in] init pointer to device specific initalization structure. * @retval "0" in case of success, an error code otherwise. */ -int LPS22HBSensor::Init(void *init) +int LPS22HBSensor::init(void *init) { if ( LPS22HB_Set_PowerMode( (void *)this, LPS22HB_LowPower) == LPS22HB_ERROR ) { @@ -164,7 +164,7 @@ * @param id the pointer where the ID of the device is stored * @retval 0 in case of success, an error code otherwise */ -int LPS22HBSensor::ReadID(uint8_t *id) +int LPS22HBSensor::read_id(uint8_t *id) { if(!id) { @@ -358,10 +358,10 @@ * @retval 0 in case of success * @retval 1 in case of failure */ -int LPS22HBSensor::ReadReg( uint8_t reg, uint8_t *data ) +int LPS22HBSensor::read_reg( uint8_t reg, uint8_t *data ) { - if ( LPS22HB_ReadReg( (void *)this, reg, 1, data ) == LPS22HB_ERROR ) + if ( LPS22HB_read_reg( (void *)this, reg, 1, data ) == LPS22HB_ERROR ) { return 1; } @@ -376,10 +376,10 @@ * @retval 0 in case of success * @retval 1 in case of failure */ -int LPS22HBSensor::WriteReg( uint8_t reg, uint8_t data ) +int LPS22HBSensor::write_reg( uint8_t reg, uint8_t data ) { - if ( LPS22HB_WriteReg( (void *)this, reg, 1, &data ) == LPS22HB_ERROR ) + if ( LPS22HB_write_reg( (void *)this, reg, 1, &data ) == LPS22HB_ERROR ) { return 1; } @@ -388,12 +388,12 @@ } -uint8_t LPS22HB_IO_Write( void *handle, uint8_t WriteAddr, uint8_t *pBuffer, uint16_t nBytesToWrite ) +uint8_t LPS22HB_io_write( void *handle, uint8_t WriteAddr, uint8_t *pBuffer, uint16_t nBytesToWrite ) { - return ((LPS22HBSensor *)handle)->IO_Write(pBuffer, WriteAddr, nBytesToWrite); + return ((LPS22HBSensor *)handle)->io_write(pBuffer, WriteAddr, nBytesToWrite); } -uint8_t LPS22HB_IO_Read( void *handle, uint8_t ReadAddr, uint8_t *pBuffer, uint16_t nBytesToRead ) +uint8_t LPS22HB_io_read( void *handle, uint8_t ReadAddr, uint8_t *pBuffer, uint16_t nBytesToRead ) { - return ((LPS22HBSensor *)handle)->IO_Read(pBuffer, ReadAddr, nBytesToRead); + return ((LPS22HBSensor *)handle)->io_read(pBuffer, ReadAddr, nBytesToRead); }