Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_module_pir.c
1 #include <bc_module_pir.h>
2 
4 {
6 }
7 
8 void bc_module_pir_set_event_handler(bc_module_pir_t *self, void (*event_handler)(bc_module_pir_t *, bc_module_pir_event_t, void*), void *event_param)
9 {
10  bc_pyq1648_set_event_handler(self, (void (*)(bc_pyq1648_t*, bc_pyq1648_event_t, void*)) event_handler, event_param);
11 }
12 
14 {
15  bc_pyq1648_set_sensitivity(self, sensitivity);
16 }
void bc_pyq1648_set_event_handler(bc_pyq1648_t *self, void(*event_handler)(bc_pyq1648_t *, bc_pyq1648_event_t, void *), void *event_param)
Set callback function.
Definition: bc_pyq1648.c:59
void bc_pyq1648_init(bc_pyq1648_t *self, bc_gpio_channel_t gpio_channel_serin, bc_gpio_channel_t gpio_channel_dl)
Initialize PYQ1648 driver.
Definition: bc_pyq1648.c:37
void bc_module_pir_set_event_handler(bc_module_pir_t *self, void(*event_handler)(bc_module_pir_t *, bc_module_pir_event_t, void *), void *event_param)
Set callback function.
Definition: bc_module_pir.c:8
GPIO channel P8.
Definition: bc_gpio.h:39
bc_module_pir_event_t
Callback events.
Definition: bc_module_pir.h:30
struct bc_pyq1648_t bc_pyq1648_t
PYQ1648 instance.
Definition: bc_pyq1648.h:44
struct bc_pyq1648_t bc_module_pir_t
BigClown PIR Module instance.
Definition: bc_module_pir.h:42
void bc_pyq1648_set_sensitivity(bc_pyq1648_t *self, bc_pyq1648_sensitivity_t sensitivity)
Set PYQ1648 sensitivity.
Definition: bc_pyq1648.c:68
bc_module_pir_sensitivity_t
Motion detection sensitivity.
Definition: bc_module_pir.h:12
void bc_module_pir_init(bc_module_pir_t *self)
Initialize PIR Module.
Definition: bc_module_pir.c:3
GPIO channel P9.
Definition: bc_gpio.h:42
void bc_module_pir_set_sensitivity(bc_module_pir_t *self, bc_module_pir_sensitivity_t sensitivity)
Set sensor sensitivity.
Definition: bc_module_pir.c:13
bc_pyq1648_event_t
Callback events.
Definition: bc_pyq1648.h:14