removed X-NUCLEO-COMMON and ST-INTERFACES

Dependents:   unh-hackathon-example unh-hackathon-example-raw

Fork of X_NUCLEO_IKS01A1 by ST

Files at this revision

API Documentation at this revision

Comitter:
Wolfgang Betz
Date:
Fri Jun 05 16:54:47 2015 +0200
Parent:
36:8c73dbe43cf2
Child:
39:1b0ddec25f87
Child:
41:4a71f1594d7d
Commit message:
Corrected minor bug in humidity sensor

Changed in this revision

Components/Common/TempSensor.h Show annotated file Show diff for this revision Revisions of this file
Components/hts221/hts221_class.cpp Show annotated file Show diff for this revision Revisions of this file
Components/lis3mdl/lis3mdl_class.h Show annotated file Show diff for this revision Revisions of this file
--- a/Components/Common/TempSensor.h	Thu Jun 04 14:09:11 2015 +0200
+++ b/Components/Common/TempSensor.h	Fri Jun 05 16:54:47 2015 +0200
@@ -76,12 +76,28 @@
 	virtual int Reset(void) = 0;
 
 	/**
-	 * @brief       Get current temperature [°C]
+	 * @brief       Get current temperature in degrees Celsius [°C]
 	 * @param[out]  pfData Pointer to where to store temperature to
 	 * @return      0 in case of success, an error code otherwise
 	 */
 	virtual int GetTemperature(float *pfData) = 0;
 
+	/**
+	 * @brief       Get current temperature in degrees Fahrenheit [°F]
+	 * @param[out]  pfData Pointer to where to store temperature to
+	 * @return      0 in case of success, an error code otherwise
+	 */
+	virtual int GetFahrenheit(float *pfData) {
+		float celsius;
+		int ret;
+
+		ret = GetTemperature(&celsius);
+		if(ret) return ret;
+
+		*pfData = ((celsius * 1.8f) + 32.0f);
+		return 0;
+	}
+
 	virtual void ConfigIT(uint16_t) = 0;
 	virtual void EnableIT(uint8_t) = 0;
 	virtual void DisableIT(uint8_t) = 0;
--- a/Components/hts221/hts221_class.cpp	Thu Jun 04 14:09:11 2015 +0200
+++ b/Components/hts221/hts221_class.cpp	Fri Jun 05 16:54:47 2015 +0200
@@ -271,7 +271,7 @@
       }
       
     }
-    while(!(tmp && 0x02));
+    while(!(tmp & 0x02));
   }
   
   
@@ -341,7 +341,7 @@
       }
       
     }
-    while(!(tmp && 0x01));
+    while(!(tmp & 0x01));
   }
   
   if(HTS221_IO_Read(&tempReg[0], (HTS221_TEMP_OUT_L_ADDR | HTS221_I2C_MULTIPLEBYTE_CMD),
--- a/Components/lis3mdl/lis3mdl_class.h	Thu Jun 04 14:09:11 2015 +0200
+++ b/Components/lis3mdl/lis3mdl_class.h	Fri Jun 05 16:54:47 2015 +0200
@@ -122,8 +122,8 @@
 	 * @param  pBuffer pointer to buffer to be filled.
 	 * @param  RegisterAddr specifies internal address register to read from.
 	 * @param  NumByteToWrite number of bytes to write.
-	 * @retval 0 if ok
-	 * @retval -1 if an I2C error has occured
+	 * @retval MAGNETO_OK if ok
+	 * @retval MAGNETO_ERROR if an I2C error has occured
 	 */
 	MAGNETO_StatusTypeDef LIS3MDL_IO_Write(uint8_t* pBuffer, 
 					       uint8_t RegisterAddr, uint16_t NumByteToWrite)