|
HF-TMC51x0 Driver (TMC5130 & TMC5160) 0.1.0-dev
Hardware Agnostic C++ Driver for the TMC51x0 (TMC5130 & TMC5160)
|
ESP-NOW receiver implementation for test unit with secure pairing. More...
#include "espnow_receiver.hpp"#include "espnow_protocol.hpp"#include "espnow_peer_store.hpp"#include <cstring>#include "esp_system.h"#include "nvs_flash.h"#include "esp_idf_pedantic_compat.hpp"#include "esp_log.h"Classes | |
| struct | RawMsg |
Functions | |
| static bool | isZeroMac (const uint8_t mac[6]) |
| static bool | macEq (const uint8_t a[6], const uint8_t b[6]) |
| static void | tryAddEspNowPeer (const uint8_t mac[6]) |
| static void | setActiveUiMac (const uint8_t mac[6]) |
| static void | espnowRecvCb (const esp_now_recv_info_t *info, const uint8_t *data, int len) |
| static void | espnowSendCb (const wifi_tx_info_t *info, esp_now_send_status_t status) |
| static void | recvTask (void *) |
| static void | handlePacket (const RawMsg &msg, const EspNowPacket &pkt, uint16_t recv_crc) |
| static void | handlePairingRequest (const uint8_t *src_mac, const EspNowPacket &pkt) |
| static void | handlePairingConfirm (const uint8_t *src_mac, const EspNowPacket &pkt) |
| static bool | sendPacketTo (const uint8_t *dst_mac, MsgType type, const void *payload, uint8_t payload_len) |
| static bool | sendPacketToUi (MsgType type, const void *payload, uint8_t payload_len) |
Variables | |
| static const char * | TAG = "EspNowRx" |
| static QueueHandle_t | s_proto_event_queue = nullptr |
| static uint8_t | s_next_msg_id = 1 |
| static SecuritySettings | s_security {} |
| Security settings with approved peer list. | |
| static uint8_t | s_active_ui_board_mac [6] = {0} |
| Active UI board MAC for replies (most recent approved sender) | |
| static QueueHandle_t | s_raw_recv_queue = nullptr |
| Receive queue from ISR to this module. | |
| static volatile bool | s_pairing_mode = false |
| Pairing mode state. | |
| static volatile TickType_t | s_pairing_timeout_tick = 0 |
| static bool | s_awaiting_pairing_confirm = false |
| Pending pairing state (waiting for confirm after sending response) | |
| static uint8_t | s_pending_requester_mac [6] = {0} |
| static uint8_t | s_my_challenge [CHALLENGE_SIZE] = {0} |
| static TickType_t | s_pairing_confirm_timeout = 0 |
ESP-NOW receiver implementation for test unit with secure pairing.
Protocol compatible with esp32_remote_controller (6-byte header).
Features:
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Active UI board MAC for replies (most recent approved sender)
|
static |
Pending pairing state (waiting for confirm after sending response)
|
static |
|
static |
|
static |
|
static |
Pairing mode state.
|
static |
|
static |
|
static |
|
static |
Receive queue from ISR to this module.
|
static |
Security settings with approved peer list.
|
static |