Thomas Kolb
2f0f6a01f2
This version uses only blocking i2c calls, and long transfers will probably cause frame loss. Also, if no BMP280 is present, the firmware will not start up and hang in an endless loop instead.
24 lines
547 B
C
24 lines
547 B
C
#ifndef BMP280_COMP_H
|
|
#define BMP280_COMP_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <fxp.h>
|
|
|
|
/*!@brief Calculate temperature from BMP280 raw sensor value.
|
|
* @returns The temperature in °C.
|
|
*/
|
|
fxp_t bmp280_comp_temperature(int32_t adc);
|
|
|
|
/*!@brief Calculate relative humidity from BMP280 raw sensor value.
|
|
* @returns The relative humidity in %.
|
|
*/
|
|
fxp_t bmp280_comp_humidity(int32_t adc);
|
|
|
|
/*!@brief Calculate pressure from BMP280 raw sensor value.
|
|
* @returns The pressure in hPa.
|
|
*/
|
|
fxp_t bmp280_comp_pressure(int32_t adc);
|
|
|
|
#endif // BMP280_COMP_H
|