#include <LwRx.h>
|
void | lwrx_setup (InternalGPIOPin *pin) |
| Set things up to receive LightWaveRF 434Mhz messages pin must be 2 or 3 to trigger interrupts !!! For Spark, any pin will work.
|
|
void | lwrx_settranslate (bool translate) |
| Set translate mode.
|
|
bool | lwrx_message () |
| Test if a message has arrived.
|
|
bool | lwrx_getmessage (uint8_t *buf, uint8_t len) |
| Transfer a message to user buffer.
|
|
void | lwrx_setfilter (uint8_t repeats, uint8_t timeout) |
| Set up repeat filtering of received messages.
|
|
uint8_t | lwrx_addpair (const uint8_t *pairdata) |
| Add a pair to filter received messages pairdata is device,dummy,5*addr,room pairdata is held in translated form to make comparisons quicker.
|
|
uint8_t | lwrx_getpair (uint8_t *pairdata, uint8_t pairnumber) |
| Get pair data (translated back to nibble form.
|
|
void | lwrx_makepair (uint8_t timeout) |
| Make a pair from next message successfully received.
|
|
void | lwrx_set_pair_mode (bool pair_enforce, bool pair_base_only) |
| Set pairs behaviour.
|
|
uint32_t | lwrx_packetinterval () |
| Return time in milliseconds since last packet received.
|
|
|
static void | rx_process_bits (LwRx *arg) |
| Pin change interrupt routine that identifies 1 and 0 LightwaveRF bits and constructs a message when a valid packet of data is received.
|
|
|
void | lwrx_clearpairing_ () |
| Clear all pairing.
|
|
bool | lwrx_getstats_ (uint16_t *stats) |
| Return stats on high and low pulses.
|
|
void | lwrx_setstatsenable_ (bool rx_stats_enable) |
| Set stats mode.
|
|
bool | rx_report_message_ () |
| Check a message to see if it should be reported under pairing / mood / all off rules returns -1 if none found.
|
|
int16_t | rx_find_nibble_ (uint8_t data) |
| Find nibble from byte returns -1 if none found.
|
|
void | rx_addpairfrommsg_ () |
| add pair from message buffer
|
|
void | rx_paircommit_ () |
| check and commit pair
|
|
void | rx_remove_pair_ (uint8_t *buf) |
| Remove an existing pair matching the buffer.
|
|
int16_t | rx_check_pairs_ (const uint8_t *buf, bool all_devices) |
| Check to see if message matches one of the pairs if mode is pairBase only then ignore device and room if allDevices is true then ignore the device number Returns matching pair number, -1 if not found, -2 if no pairs defined.
|
|
Definition at line 47 of file LwRx.h.
◆ lwrx_addpair()
uint8_t esphome::lightwaverf::LwRx::lwrx_addpair |
( |
const uint8_t * | pairdata | ) |
|
Add a pair to filter received messages pairdata is device,dummy,5*addr,room pairdata is held in translated form to make comparisons quicker.
Definition at line 240 of file LwRx.cpp.
◆ lwrx_clearpairing_()
void esphome::lightwaverf::LwRx::lwrx_clearpairing_ |
( |
| ) |
|
|
protected |
Clear all pairing.
Definition at line 276 of file LwRx.cpp.
◆ lwrx_getmessage()
bool esphome::lightwaverf::LwRx::lwrx_getmessage |
( |
uint8_t * | buf, |
|
|
uint8_t | len ) |
Transfer a message to user buffer.
Definition at line 184 of file LwRx.cpp.
◆ lwrx_getpair()
uint8_t esphome::lightwaverf::LwRx::lwrx_getpair |
( |
uint8_t * | pairdata, |
|
|
uint8_t | pairnumber ) |
Get pair data (translated back to nibble form.
Definition at line 261 of file LwRx.cpp.
◆ lwrx_getstats_()
bool esphome::lightwaverf::LwRx::lwrx_getstats_ |
( |
uint16_t * | stats | ) |
|
|
protected |
Return stats on high and low pulses.
Definition at line 281 of file LwRx.cpp.
◆ lwrx_makepair()
void esphome::lightwaverf::LwRx::lwrx_makepair |
( |
uint8_t | timeout | ) |
|
Make a pair from next message successfully received.
Definition at line 253 of file LwRx.cpp.
◆ lwrx_message()
bool esphome::lightwaverf::LwRx::lwrx_message |
( |
| ) |
|
Test if a message has arrived.
Definition at line 175 of file LwRx.cpp.
◆ lwrx_packetinterval()
uint32_t esphome::lightwaverf::LwRx::lwrx_packetinterval |
( |
| ) |
|
Return time in milliseconds since last packet received.
Definition at line 225 of file LwRx.cpp.
◆ lwrx_set_pair_mode()
void esphome::lightwaverf::LwRx::lwrx_set_pair_mode |
( |
bool | pair_enforce, |
|
|
bool | pair_base_only ) |
Set pairs behaviour.
Definition at line 303 of file LwRx.cpp.
◆ lwrx_setfilter()
void esphome::lightwaverf::LwRx::lwrx_setfilter |
( |
uint8_t | repeats, |
|
|
uint8_t | timeout ) |
Set up repeat filtering of received messages.
Definition at line 230 of file LwRx.cpp.
◆ lwrx_setstatsenable_()
void esphome::lightwaverf::LwRx::lwrx_setstatsenable_ |
( |
bool | rx_stats_enable | ) |
|
|
protected |
Set stats mode.
Definition at line 293 of file LwRx.cpp.
◆ lwrx_settranslate()
void esphome::lightwaverf::LwRx::lwrx_settranslate |
( |
bool | translate | ) |
|
Set translate mode.
Definition at line 180 of file LwRx.cpp.
◆ lwrx_setup()
Set things up to receive LightWaveRF 434Mhz messages pin must be 2 or 3 to trigger interrupts !!! For Spark, any pin will work.
Definition at line 313 of file LwRx.cpp.
◆ rx_addpairfrommsg_()
void esphome::lightwaverf::LwRx::rx_addpairfrommsg_ |
( |
| ) |
|
|
protected |
add pair from message buffer
Definition at line 354 of file LwRx.cpp.
◆ rx_check_pairs_()
int16_t esphome::lightwaverf::LwRx::rx_check_pairs_ |
( |
const uint8_t * | buf, |
|
|
bool | all_devices ) |
|
protected |
Check to see if message matches one of the pairs if mode is pairBase only then ignore device and room if allDevices is true then ignore the device number Returns matching pair number, -1 if not found, -2 if no pairs defined.
Definition at line 376 of file LwRx.cpp.
◆ rx_find_nibble_()
int16_t esphome::lightwaverf::LwRx::rx_find_nibble_ |
( |
uint8_t | data | ) |
|
|
protected |
Find nibble from byte returns -1 if none found.
Definition at line 341 of file LwRx.cpp.
◆ rx_paircommit_()
void esphome::lightwaverf::LwRx::rx_paircommit_ |
( |
| ) |
|
|
protected |
check and commit pair
Definition at line 364 of file LwRx.cpp.
◆ rx_process_bits()
void IRAM_ATTR esphome::lightwaverf::LwRx::rx_process_bits |
( |
LwRx * | arg | ) |
|
|
static |
Pin change interrupt routine that identifies 1 and 0 LightwaveRF bits and constructs a message when a valid packet of data is received.
Definition at line 20 of file LwRx.cpp.
◆ rx_remove_pair_()
void esphome::lightwaverf::LwRx::rx_remove_pair_ |
( |
uint8_t * | buf | ) |
|
|
protected |
Remove an existing pair matching the buffer.
Definition at line 412 of file LwRx.cpp.
◆ rx_report_message_()
bool esphome::lightwaverf::LwRx::rx_report_message_ |
( |
| ) |
|
|
protected |
Check a message to see if it should be reported under pairing / mood / all off rules returns -1 if none found.
Definition at line 326 of file LwRx.cpp.
◆ lwrx_stats
uint16_t esphome::lightwaverf::LwRx::lwrx_stats[RX_STAT_COUNT] |
◆ lwrx_stats_enable
bool esphome::lightwaverf::LwRx::lwrx_stats_enable = true |
◆ rx_buf
uint8_t esphome::lightwaverf::LwRx::rx_buf[RX_MSGLEN] |
◆ rx_msg
uint8_t esphome::lightwaverf::LwRx::rx_msg[RX_MSGLEN] |
◆ rx_msgcomplete
bool esphome::lightwaverf::LwRx::rx_msgcomplete = false |
◆ rx_num_bits
uint8_t esphome::lightwaverf::LwRx::rx_num_bits = 0 |
◆ rx_num_bytes
uint8_t esphome::lightwaverf::LwRx::rx_num_bytes = 0 |
◆ rx_pairBaseOnly
bool esphome::lightwaverf::LwRx::rx_pairBaseOnly = false |
◆ rx_paircount
uint8_t esphome::lightwaverf::LwRx::rx_paircount = 0 |
◆ rx_pairEnforce
bool esphome::lightwaverf::LwRx::rx_pairEnforce = false |
◆ rx_pairs
uint8_t esphome::lightwaverf::LwRx::rx_pairs[RX_MAXPAIRS][8] |
◆ rx_pairstarttime
uint32_t esphome::lightwaverf::LwRx::rx_pairstarttime = 0 |
◆ rx_pairtimeout
uint8_t esphome::lightwaverf::LwRx::rx_pairtimeout = 0 |
◆ rx_pin_
◆ rx_pin_isr_
◆ rx_prev
uint32_t esphome::lightwaverf::LwRx::rx_prev |
◆ rx_prevpkttime
uint32_t esphome::lightwaverf::LwRx::rx_prevpkttime = 0 |
◆ rx_repeatcount
uint8_t esphome::lightwaverf::LwRx::rx_repeatcount = 0 |
◆ rx_repeats
uint8_t esphome::lightwaverf::LwRx::rx_repeats = 2 |
◆ rx_state
uint8_t esphome::lightwaverf::LwRx::rx_state = 0 |
◆ rx_timeout
uint8_t esphome::lightwaverf::LwRx::rx_timeout = 20 |
◆ rx_translate
bool esphome::lightwaverf::LwRx::rx_translate = true |
The documentation for this class was generated from the following files:
- esphome/components/lightwaverf/LwRx.h
- esphome/components/lightwaverf/LwRx.cpp