Device driver interface for the PIR motion sensor. More...

Detailed Description

Device driver interface for the PIR motion sensor.

Author
Ludwig Knüpfer ludwi.nosp@m.g.kn.nosp@m.uepfe.nosp@m.r@fu.nosp@m.-berl.nosp@m.in.d.nosp@m.e

Definition in file pir.h.

#include "kernel_types.h"
#include "periph/gpio.h"
+ Include dependency graph for pir.h:

Go to the source code of this file.

Data Structures

struct  pir_t
 device descriptor for a PIR sensor More...
 

Macros

#define PIR_MSG_T_STATUS_START   150
 value to configure sensitivity of sensore
 

Enumerations

enum  pir_event_t { PIR_STATUS_HI = PIR_MSG_T_STATUS_START, PIR_STATUS_LO }
 event type for a PIR sensor More...
 

Functions

int pir_init (pir_t *dev, gpio_t gpio)
 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_register_thread (pir_t *dev)
 Register a thread for notification whan state changes on the motion sensor. More...