Send file data through D7A Action Protocol demo.
Dependencies: modem_ref_helper
Diff: sensor.h
- Revision:
- 0:3058da317f01
- Child:
- 6:d4512d8f5dff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sensor.h Thu May 11 14:49:14 2017 +0000 @@ -0,0 +1,27 @@ +#ifndef __SENSOR_H__ +#define __SENSOR_H__ + +#include "hal_types.h" + +// Types of reporting +typedef enum +{ + REPORT_ALWAYS, + REPORT_ON_DIFFERENCE, + REPORT_ON_THRESHOLD, +} report_type_t; + +// Sensor reporting configuration +TYPEDEF_STRUCT_PACKED +{ + uint8_t report_type; // Type of report asked + uint32_t read_period; // Measure period (ms) + uint32_t max_period; // Maximum time between reports (s) + uint32_t max_diff; // Maximum difference allowed between two reported values + int32_t threshold_high; // High threshold value triggering a report + int32_t threshold_low; // Low threshold value triggering a report +} sensor_config_t; + +uint8_t sensor_get_light(void); + +#endif \ No newline at end of file