Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
bme280.h@0:f2d2dc1e207d, 2019-07-16 (annotated)
- Committer:
- takepiyo
- Date:
- Tue Jul 16 12:19:17 2019 +0000
- Revision:
- 0:f2d2dc1e207d
love
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
takepiyo | 0:f2d2dc1e207d | 1 | #ifndef MBED_BME280_SPI_H |
takepiyo | 0:f2d2dc1e207d | 2 | #define MBED_BME280_SPI_H |
takepiyo | 0:f2d2dc1e207d | 3 | |
takepiyo | 0:f2d2dc1e207d | 4 | #include "mbed.h" |
takepiyo | 0:f2d2dc1e207d | 5 | |
takepiyo | 0:f2d2dc1e207d | 6 | class BME280 |
takepiyo | 0:f2d2dc1e207d | 7 | { |
takepiyo | 0:f2d2dc1e207d | 8 | private: |
takepiyo | 0:f2d2dc1e207d | 9 | uint16_t dig_T1; |
takepiyo | 0:f2d2dc1e207d | 10 | int16_t dig_T2, dig_T3; |
takepiyo | 0:f2d2dc1e207d | 11 | uint16_t dig_P1; |
takepiyo | 0:f2d2dc1e207d | 12 | int16_t dig_P2, dig_P3, dig_P4, dig_P5, dig_P6, dig_P7, dig_P8, dig_P9; |
takepiyo | 0:f2d2dc1e207d | 13 | uint16_t dig_H1, dig_H3; |
takepiyo | 0:f2d2dc1e207d | 14 | int16_t dig_H2, dig_H4, dig_H5, dig_H6; |
takepiyo | 0:f2d2dc1e207d | 15 | int32_t t_fine; |
takepiyo | 0:f2d2dc1e207d | 16 | |
takepiyo | 0:f2d2dc1e207d | 17 | public: |
takepiyo | 0:f2d2dc1e207d | 18 | enum spi_mask { |
takepiyo | 0:f2d2dc1e207d | 19 | BME280_MASK = 0x7F |
takepiyo | 0:f2d2dc1e207d | 20 | }; |
takepiyo | 0:f2d2dc1e207d | 21 | |
takepiyo | 0:f2d2dc1e207d | 22 | BME280(); |
takepiyo | 0:f2d2dc1e207d | 23 | |
takepiyo | 0:f2d2dc1e207d | 24 | //void initialize(void); |
takepiyo | 0:f2d2dc1e207d | 25 | |
takepiyo | 0:f2d2dc1e207d | 26 | float getTemperature(void); |
takepiyo | 0:f2d2dc1e207d | 27 | |
takepiyo | 0:f2d2dc1e207d | 28 | float getPressure(void); |
takepiyo | 0:f2d2dc1e207d | 29 | |
takepiyo | 0:f2d2dc1e207d | 30 | float getHumidity(void); |
takepiyo | 0:f2d2dc1e207d | 31 | }; |
takepiyo | 0:f2d2dc1e207d | 32 | |
takepiyo | 0:f2d2dc1e207d | 33 | #endif |