|
Firmware SDK
|
Driver for PIR Module. More...
Typedefs | |
| typedef struct twr_pyq1648_t | twr_module_pir_t |
| HARDWARIO PIR Module instance. | |
Enumerations | |
| enum | twr_module_pir_sensitivity_t { TWR_MODULE_PIR_SENSITIVITY_LOW = TWR_PYQ1648_SENSITIVITY_LOW , TWR_MODULE_PIR_SENSITIVITY_MEDIUM = TWR_PYQ1648_SENSITIVITY_MEDIUM , TWR_MODULE_PIR_SENSITIVITY_HIGH = TWR_PYQ1648_SENSITIVITY_HIGH , TWR_MODULE_PIR_SENSITIVITY_VERY_HIGH = TWR_PYQ1648_SENSITIVITY_VERY_HIGH } |
| Motion detection sensitivity. More... | |
| enum | twr_module_pir_event_t { TWR_MODULE_PIR_EVENT_ERROR = TWR_PYQ1648_EVENT_ERROR , TWR_MODULE_PIR_EVENT_MOTION = TWR_PYQ1648_EVENT_MOTION } |
| Callback events. More... | |
Functions | |
| void | twr_module_pir_init (twr_module_pir_t *self) |
| Initialize PIR Module. More... | |
| void | twr_module_pir_set_event_handler (twr_module_pir_t *self, void(*event_handler)(twr_module_pir_t *, twr_module_pir_event_t, void *), void *event_param) |
| Set callback function. More... | |
| void | twr_module_pir_set_sensitivity (twr_module_pir_t *self, twr_module_pir_sensitivity_t sensitivity) |
| Set sensor sensitivity. More... | |
Driver for PIR Module.
Callback events.
| Enumerator | |
|---|---|
| TWR_MODULE_PIR_EVENT_ERROR | Error event. |
| TWR_MODULE_PIR_EVENT_MOTION | Motion event. |
Definition at line 30 of file twr_module_pir.h.
Motion detection sensitivity.
Definition at line 12 of file twr_module_pir.h.
| void twr_module_pir_init | ( | twr_module_pir_t * | self | ) |
Initialize PIR Module.
| [in] | self | Instance |
Definition at line 3 of file twr_module_pir.c.

| void twr_module_pir_set_event_handler | ( | twr_module_pir_t * | self, |
| void(*)(twr_module_pir_t *, twr_module_pir_event_t, void *) | event_handler, | ||
| void * | event_param | ||
| ) |
Set callback function.
| [in] | self | Instance |
| [in] | event_handler | Function address |
| [in] | event_param | Optional event parameter (can be NULL) |
Definition at line 8 of file twr_module_pir.c.

| void twr_module_pir_set_sensitivity | ( | twr_module_pir_t * | self, |
| twr_module_pir_sensitivity_t | sensitivity | ||
| ) |
Set sensor sensitivity.
| [in] | self | Instance |
| [in] | sensitivity | Desired sensitivity |
Definition at line 13 of file twr_module_pir.c.
