Device driver interface for the PIR motion sensor. More...
Device driver interface for the PIR motion sensor.
Definition in file pir.h.
 Include dependency graph for pir.h:
 This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | pir_params_t | 
| Parameters needed for device initialization.  More... | |
| struct | pir_t | 
| device descriptor for a PIR sensor  More... | |
Macros | |
| #define | PIR_MSG_T_STATUS_START 150 | 
| Sensitivity of sensor.  | |
Enumerations | |
| enum | { PIR_OK = 0 , PIR_NOGPIO = -1 , PIR_NOTHREAD = -2 , PIR_TIMEERR = -3 } | 
| PIR specific return values.  More... | |
| enum | pir_event_t { PIR_STATUS_ACTIVE = PIR_MSG_T_STATUS_START , PIR_STATUS_INACTIVE } | 
| event type for a PIR sensor  More... | |
Functions | |
| int | pir_init (pir_t *dev, const pir_params_t *params) | 
| Initialize a PIR motion sensor.  More... | |
| pir_event_t | pir_get_status (const pir_t *dev) | 
| Read the current status of the motion sensor.  More... | |
| int | pir_get_occupancy (pir_t *dev, int16_t *occup) | 
| Read OCCUPANCY value.  More... | |
| int | pir_register_thread (pir_t *dev) | 
| Register a thread for notification when state changes on the motion sensor.  More... | |