Appiko
Data Structures | Functions

Driver use detect motion based on threshold from a PIR sensor based on PPI based automated ADC sampling of the PIR signal from the triggering of a RTC timer. More...

Data Structures

struct  pir_sense_cfg
 Stucture for passing the configuration for initializing the PIR Sense module. More...
 

Functions

void pir_sense_start (pir_sense_cfg *init)
 
void pir_sense_stop (void)
 Disable the peripherals involved - SAADC, PPIs and RTC0. More...
 

Detailed Description

The image below gives the flow of how the peripherals of nRF52 is setup for this application.

Warning
This module needs the LFCLK to be on and running to be able to work
This module uses RTC0, which is used by Softdevice. So this module will not work with a Softdevice.

Function Documentation

◆ pir_sense_start()

void pir_sense_start ( pir_sense_cfg init)

Initialize and start the PIR Sense module based on the configuration received

Parameters
initInitialization configuration pointer

Definition at line 57 of file pir_sense.c.

References pir_sense_cfg::handler.

◆ pir_sense_stop()

void pir_sense_stop ( void  )

Deinitializes, stops the PIR Sense module and frees the peripherals used by it

Definition at line 125 of file pir_sense.c.