Firmware SDK
twr_cp201t.h
1 #ifndef _TWR_CP201T_H
2 #define _TWR_CP201T_H
3 
4 #include <twr_module_sensor.h>
5 #include <twr_scheduler.h>
6 
7 typedef enum
8 {
10  TWR_CP201T_EVENT_ERROR = 0,
11 
13  TWR_CP201T_EVENT_UPDATE = 1
14 
15 } twr_cp201t_event_t;
16 
21 
22 bool twr_cp201t_init(twr_module_sensor_channel_t channel);
23 
28 
29 void twr_cp201t_set_event_handler(twr_module_sensor_channel_t channel, void (*event_handler)(twr_module_sensor_channel_t, twr_cp201t_event_t, void *), void *event_param);
30 
34 
35 void twr_cp201t_set_update_interval(twr_module_sensor_channel_t channel, twr_tick_t interval);
36 
42 
43 bool twr_cp201t_get_temperature_celsius(twr_module_sensor_channel_t channel, float *celsius);
44 
45 #endif // _TWR_CP201T_H
twr_module_sensor_channel_t
Sensor Module channels.
uint64_t twr_tick_t
Timestamp data type.
Definition: twr_tick.h:16