Test firmware for the Supermote hardware.
Dependencies: K30_I2C libxDot-mbed5
Fork of K30_I2C_Program by
HPM/hpm.h@3:2ab969b31f6b, 2018-09-14 (annotated)
- Committer:
- bjenkins
- Date:
- Fri Sep 14 03:17:31 2018 +0000
- Revision:
- 3:2ab969b31f6b
- Parent:
- 2:680fc2690d10
Update PM code
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bjenkins | 2:680fc2690d10 | 1 | #ifndef HPM_h |
bjenkins | 2:680fc2690d10 | 2 | #define HPM_h |
bjenkins | 2:680fc2690d10 | 3 | |
bjenkins | 2:680fc2690d10 | 4 | #include "mbed.h" |
bjenkins | 2:680fc2690d10 | 5 | |
bjenkins | 2:680fc2690d10 | 6 | class HPM |
bjenkins | 2:680fc2690d10 | 7 | { |
bjenkins | 2:680fc2690d10 | 8 | public: |
bjenkins | 2:680fc2690d10 | 9 | HPM(Serial* device, Serial* debug); |
bjenkins | 2:680fc2690d10 | 10 | bool init(void); |
bjenkins | 2:680fc2690d10 | 11 | bool start_measurement(void); |
bjenkins | 2:680fc2690d10 | 12 | bool stop_measurement(void); |
bjenkins | 2:680fc2690d10 | 13 | bool read_measurement (long int &PM25, long int &PM10); |
bjenkins | 2:680fc2690d10 | 14 | bool stop_autosend(void); |
bjenkins | 2:680fc2690d10 | 15 | bool start_autosend(void); |
bjenkins | 2:680fc2690d10 | 16 | |
bjenkins | 2:680fc2690d10 | 17 | private: |
bjenkins | 3:2ab969b31f6b | 18 | void clear_rx_buffer(void); |
bjenkins | 3:2ab969b31f6b | 19 | |
bjenkins | 2:680fc2690d10 | 20 | Serial* _device; |
bjenkins | 2:680fc2690d10 | 21 | Serial* _debug; |
bjenkins | 2:680fc2690d10 | 22 | }; |
bjenkins | 2:680fc2690d10 | 23 | |
bjenkins | 2:680fc2690d10 | 24 | #endif |