lib para o framework sgam
Dependencies: MPU6050 Grove_temperature
Dependents: example_smart-grid
peripheral/impl/Temperature.h@5:caecc2426bbb, 2019-06-06 (annotated)
- Committer:
- AndersonIctus
- Date:
- Thu Jun 06 23:54:07 2019 -0300
- Revision:
- 5:caecc2426bbb
- Parent:
- 4:f21aab30658a
- Mudancas para por a chamada Assincrona na LIB !!
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AndersonIctus | 1:53edfdd6ac03 | 1 | #ifndef SGAM_TEMPERATURE_H |
AndersonIctus | 1:53edfdd6ac03 | 2 | #define SGAM_TEMPERATURE_H |
AndersonIctus | 1:53edfdd6ac03 | 3 | |
AndersonIctus | 3:f998244e9f80 | 4 | #include "mbed.h" |
AndersonIctus | 1:53edfdd6ac03 | 5 | #include "Sensor.h" |
AndersonIctus | 1:53edfdd6ac03 | 6 | #include "Grove_temperature.h" |
AndersonIctus | 1:53edfdd6ac03 | 7 | |
AndersonIctus | 3:f998244e9f80 | 8 | class Temperature: public Sensor<float> { |
AndersonIctus | 1:53edfdd6ac03 | 9 | public: |
AndersonIctus | 1:53edfdd6ac03 | 10 | Temperature(PinName pin); |
AndersonIctus | 3:f998244e9f80 | 11 | virtual ~Temperature(); |
AndersonIctus | 1:53edfdd6ac03 | 12 | |
AndersonIctus | 4:f21aab30658a | 13 | virtual float getValue(); |
AndersonIctus | 5:caecc2426bbb | 14 | virtual void setCallbackReadOcurred( void (*callback_sensor)(float* value), uint32_t timeout ); |
AndersonIctus | 5:caecc2426bbb | 15 | virtual void initializeTask(); |
AndersonIctus | 5:caecc2426bbb | 16 | virtual void finalizeTask(); |
AndersonIctus | 4:f21aab30658a | 17 | |
AndersonIctus | 4:f21aab30658a | 18 | protected: |
AndersonIctus | 5:caecc2426bbb | 19 | static void run(void const *self_context); |
AndersonIctus | 4:f21aab30658a | 20 | virtual void acceptDataEvent(float* data); |
AndersonIctus | 1:53edfdd6ac03 | 21 | |
AndersonIctus | 1:53edfdd6ac03 | 22 | private: |
AndersonIctus | 1:53edfdd6ac03 | 23 | Grove_temperature temperature; |
AndersonIctus | 5:caecc2426bbb | 24 | Thread* t; |
AndersonIctus | 5:caecc2426bbb | 25 | uint32_t timeout; |
AndersonIctus | 3:f998244e9f80 | 26 | }; |
AndersonIctus | 3:f998244e9f80 | 27 | |
AndersonIctus | 1:53edfdd6ac03 | 28 | #endif // SGAM_TEMPERATURE_H |