Open RTS
Full implementation of the Somfy RTS protocol
Loading...
Searching...
No Matches
rts_pulse_source Struct Reference

Provides an interface for a source of RTS pulses, eg a GPIO or radio. More...

#include <rts_pulse_source.h>

Inherited by RTSPulseSource [protected].

Related Symbols

(Note that these are not member symbols.)

void rts_pulse_source_init_espidf_gpio (struct rts_pulse_source *pulse_source, uint8_t data_pin)
 Initialize an rts_pulse_source which receives pulses from the specified ESP-IDF GPIO pin.
 
void rts_pulse_source_init_gpiod (struct rts_pulse_source *pulse_source, char *device, uint8_t data_pin)
 Initialize an rts_pulse_source which receives pulses from the specified Linux gpiod device.
 
void rts_pulse_source_enable (struct rts_pulse_source *pulse_source)
 Enable the pulse source.
 
void rts_pulse_source_disable (struct rts_pulse_source *pulse_source)
 Disable the pulse source.
 
void rts_pulse_source_update (struct rts_pulse_source *pulse_source)
 Check for new pulse data, should be called every loop()
 
void rts_pulse_source_attach (struct rts_pulse_source *pulse_source, struct rts_frame_builder *frame_builder)
 Attach an observer.
 
void rts_pulse_source_close (struct rts_pulse_source *pulse_source)
 Close and free any resources allocated via a previous call to rts_pulse_source_init_*()
 

Detailed Description

Provides an interface for a source of RTS pulses, eg a GPIO or radio.

Bundled implementations are provided for Linux/Raspberry Pi gpiod (rts_pulse_source_init_gpiod).

Implementations must define the enable, disable, and update functions and set the function pointers in the rts_pulse_source struct.

When a new pulse is detected in rts_pulse_source_update, implementations should call rts_frame_builder_handle_pulse on the observer.


The documentation for this struct was generated from the following files: