6 #include <twr_scheduler.h>
50 TWR_PYQ1648_STATE_ERROR = -1,
51 TWR_PYQ1648_STATE_INITIALIZE = 0,
52 TWR_PYQ1648_STATE_IGNORE = 1,
53 TWR_PYQ1648_STATE_CHECK = 2
55 } twr_pyq1648_state_t;
63 twr_pyq1648_state_t _state;
twr_gpio_channel_t
GPIO channels.
struct twr_pyq1648_t twr_pyq1648_t
PYQ1648 instance.
void twr_pyq1648_set_sensitivity(twr_pyq1648_t *self, twr_pyq1648_sensitivity_t sensitivity)
Set PYQ1648 sensitivity.
void twr_pyq1648_set_blank_period(twr_pyq1648_t *self, twr_tick_t blank_period)
Set blank period (for how long alarm events will be ignored)
void twr_pyq1648_init(twr_pyq1648_t *self, twr_gpio_channel_t gpio_channel_serin, twr_gpio_channel_t gpio_channel_dl)
Initialize PYQ1648 driver.
twr_pyq1648_sensitivity_t
Possible sensitivities.
void twr_pyq1648_set_event_handler(twr_pyq1648_t *self, void(*event_handler)(twr_pyq1648_t *, twr_pyq1648_event_t, void *), void *event_param)
Set callback function.
twr_pyq1648_event_t
Callback events.
@ TWR_PYQ1648_SENSITIVITY_HIGH
High sensitivity.
@ TWR_PYQ1648_SENSITIVITY_VERY_HIGH
Very high sensitivity.
@ TWR_PYQ1648_SENSITIVITY_LOW
Low sensitivity.
@ TWR_PYQ1648_SENSITIVITY_MEDIUM
Medium sensitivity.
@ TWR_PYQ1648_EVENT_ERROR
Error event.
@ TWR_PYQ1648_EVENT_MOTION
Update event.
size_t twr_scheduler_task_id_t
Task ID assigned by scheduler.
uint64_t twr_tick_t
Timestamp data type.