Appiko
Data Structures | Macros | Functions
TSSP Detector Driver

Driver for TSSP IR beam detector. More...

Data Structures

struct  tssp_detect_config_t
 Structure to store information required to use this module. More...
 

Macros

#define TSSP_DETECT_TICKS_MS(ms)   ((uint32_t) ROUNDED_DIV( (TSSP_DETECT_FREQ*(uint64_t)(ms)) , 1000) )
 

Functions

void tssp_detect_init (tssp_detect_config_t *tssp_detect_config)
 Function to initialize IR detect sub-module. More...
 
void tssp_detect_window_detect (void)
 Function to start IR pulse detection. More...
 
void tssp_detect_pulse_stop (void)
 Function to stop IR pulse detection. More...
 
void tssp_detect_window_stop (void)
 Function to stop IR missed window detection.
 
void tssp_detect_pulse_detect (void)
 Function to start module is pulse detecting mode. More...
 
void tssp_detect_window_sync (uint32_t sync_ms)
 Function to Synchronize TSSP detector to IR transmitter which is being used. More...
 

Detailed Description

Macro Definition Documentation

◆ TSSP_DETECT_TICKS_MS

#define TSSP_DETECT_TICKS_MS (   ms)    ((uint32_t) ROUNDED_DIV( (TSSP_DETECT_FREQ*(uint64_t)(ms)) , 1000) )

Macro to find out the rounded number of TSSP_DETECT ticks for the passed time in milli-seconds

Definition at line 70 of file tssp_detect.h.

Function Documentation

◆ tssp_detect_init()

void tssp_detect_init ( tssp_detect_config_t tssp_detect_config)
Parameters
tssp_detect_configConfiguration requtssped for initialization

Definition at line 86 of file tssp_detect.c.

References tssp_detect_config_t::rx_en_pin.

◆ tssp_detect_pulse_detect()

void tssp_detect_pulse_detect ( void  )

Definition at line 196 of file tssp_detect.c.

References GPIOTE_CHANNEL_USED.

◆ tssp_detect_pulse_stop()

void tssp_detect_pulse_stop ( void  )

Definition at line 156 of file tssp_detect.c.

References GPIOTE_CHANNEL_USED.

◆ tssp_detect_window_detect()

void tssp_detect_window_detect ( void  )

Definition at line 131 of file tssp_detect.c.

References GPIOTE_CHANNEL_USED.

◆ tssp_detect_window_sync()

void tssp_detect_window_sync ( uint32_t  sync_ms)
Parameters
sync_msSynchronization time in ms

Definition at line 214 of file tssp_detect.c.