Beta

Dependencies:   ST_INTERFACES X_NUCLEO_COMMON

Fork of X_NUCLEO_IKS01A2 by ST

Revision:
9:038121268b07
Parent:
6:671fd10a51b7
--- a/Components/HTS221Sensor/HTS221Sensor.cpp	Tue Mar 14 13:56:20 2017 +0100
+++ b/Components/HTS221Sensor/HTS221Sensor.cpp	Tue Mar 14 13:30:55 2017 +0000
@@ -50,9 +50,9 @@
  * @param i2c object of an helper class which handles the I2C peripheral
  * @param address the address of the component's instance
  */
-HTS221Sensor::HTS221Sensor(DevI2C &i2c) : dev_i2c(i2c)
+HTS221Sensor::HTS221Sensor(DevI2C &i2c) : _dev_i2c(i2c)
 {
-  address = HTS221_I2C_ADDRESS;
+  _address = HTS221_I2C_ADDRESS;
 };
 
 
@@ -60,7 +60,7 @@
  * @param i2c object of an helper class which handles the I2C peripheral
  * @param address the address of the component's instance
  */
-HTS221Sensor::HTS221Sensor(DevI2C &i2c, uint8_t address) : dev_i2c(i2c), address(address)
+HTS221Sensor::HTS221Sensor(DevI2C &i2c, uint8_t address) : _dev_i2c(i2c), _address(address)
 {
 
 };
@@ -84,7 +84,7 @@
     return 1;
   }
   
-  if(Set_ODR(1.0f) == 1)
+  if(set_odr(1.0f) == 1)
   {
     return 1;
   }
@@ -96,7 +96,7 @@
  * @brief  Enable HTS221
  * @retval 0 in case of success, an error code otherwise
  */
-int HTS221Sensor::Enable(void)
+int HTS221Sensor::enable(void)
 {
   /* Power up the device */
   if ( HTS221_Activate( (void *)this ) == HTS221_ERROR )
@@ -111,7 +111,7 @@
  * @brief  Disable HTS221
  * @retval 0 in case of success, an error code otherwise
  */
-int HTS221Sensor::Disable(void)
+int HTS221Sensor::disable(void)
 {
   /* Power up the device */
   if ( HTS221_DeActivate( (void *)this ) == HTS221_ERROR )
@@ -148,7 +148,7 @@
  * @param  None
  * @retval 0 in case of success, an error code otherwise
  */
-int HTS221Sensor::Reset(void)
+int HTS221Sensor::reset(void)
 {
     uint8_t tmpreg;
 
@@ -175,7 +175,7 @@
  * @param  pfData the pointer to data output
  * @retval 0 in case of success, an error code otherwise
  */
-int HTS221Sensor::GetHumidity(float* pfData)
+int HTS221Sensor::get_humidity(float* pfData)
 {
   uint16_t uint16data = 0;
 
@@ -195,7 +195,7 @@
  * @param  pfData the pointer to data output
  * @retval 0 in case of success, an error code otherwise
  */
-int HTS221Sensor::GetTemperature(float* pfData)
+int HTS221Sensor::get_temperature(float* pfData)
 {
   int16_t int16data = 0;
 
@@ -215,7 +215,7 @@
  * @param  odr the pointer to the output data rate
  * @retval 0 in case of success, an error code otherwise
  */
-int HTS221Sensor::Get_ODR(float* odr)
+int HTS221Sensor::get_odr(float* odr)
 {
   HTS221_Odr_et odr_low_level;
 
@@ -251,7 +251,7 @@
  * @param  odr the output data rate to be set
  * @retval 0 in case of success, an error code otherwise
  */
-int HTS221Sensor::Set_ODR(float odr)
+int HTS221Sensor::set_odr(float odr)
 {
   HTS221_Odr_et new_odr;