BMP280.h 867 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef UNITEMP_BMP280
  2. #define UNITEMP_BMP280
  3. #include "../unitemp.h"
  4. #include "../Sensors.h"
  5. #include "../interfaces/I2CSensor.h"
  6. #include "SensorsDriver.h"
  7. typedef struct {
  8. uint16_t dig_T1;
  9. int16_t dig_T2;
  10. int16_t dig_T3;
  11. } BMP280_temp_cal;
  12. typedef struct {
  13. uint16_t dig_P1;
  14. int16_t dig_P2;
  15. int16_t dig_P3;
  16. int16_t dig_P4;
  17. int16_t dig_P5;
  18. int16_t dig_P6;
  19. int16_t dig_P7;
  20. int16_t dig_P8;
  21. int16_t dig_P9;
  22. } BMP280_press_cal;
  23. typedef struct {
  24. BMP280_temp_cal temp_cal;
  25. BMP280_press_cal press_cal;
  26. } BMP280_instance;
  27. /**
  28. * @brief Инициализация датчика
  29. *
  30. * @param i2c_sensor Указатель на датчик
  31. * @return Инстина если инициализация успешная
  32. */
  33. bool BMP280_init(I2CSensor* i2c_sensor);
  34. bool BMP280_updateData(Sensor* sensor);
  35. #endif