bah oui
Dependents: STM32_Button_Interrupt_dla_taty
DS1820.h@11:9be3e73c01f1, 2015-10-28 (annotated)
- Committer:
- hudakz
- Date:
- Wed Oct 28 17:34:25 2015 +0000
- Revision:
- 11:9be3e73c01f1
- Parent:
- 8:8dfdd1603e4d
read function performing CRC added.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hudakz | 0:433af64321d5 | 1 | #ifndef DS1820_H_ |
hudakz | 0:433af64321d5 | 2 | #define DS1820_H_ |
hudakz | 0:433af64321d5 | 3 | |
hudakz | 0:433af64321d5 | 4 | #include <OneWire.h> |
hudakz | 0:433af64321d5 | 5 | |
hudakz | 0:433af64321d5 | 6 | class DS1820 |
hudakz | 0:433af64321d5 | 7 | { |
hudakz | 0:433af64321d5 | 8 | OneWire oneWire; |
hudakz | 8:8dfdd1603e4d | 9 | bool present; |
hudakz | 8:8dfdd1603e4d | 10 | bool model_s; |
hudakz | 0:433af64321d5 | 11 | uint8_t data[12]; |
hudakz | 0:433af64321d5 | 12 | uint8_t addr[8]; |
hudakz | 0:433af64321d5 | 13 | float toFloat(uint16_t word); |
hudakz | 0:433af64321d5 | 14 | public: |
hudakz | 7:4403a206e78a | 15 | |
hudakz | 0:433af64321d5 | 16 | DS1820(PinName pin); |
hudakz | 0:433af64321d5 | 17 | DS1820(char model, PinName pin); |
hudakz | 11:9be3e73c01f1 | 18 | bool begin(void); |
hudakz | 11:9be3e73c01f1 | 19 | bool isPresent(); |
hudakz | 11:9be3e73c01f1 | 20 | void setResolution(uint8_t res); |
hudakz | 11:9be3e73c01f1 | 21 | void startConversion(void); |
hudakz | 11:9be3e73c01f1 | 22 | float read(void); |
hudakz | 11:9be3e73c01f1 | 23 | uint8_t read(float& temp); |
hudakz | 0:433af64321d5 | 24 | }; |
hudakz | 0:433af64321d5 | 25 | #endif /* DS1820_H_ */ |