/** * ESP-NOW Receiver Module (Controller B) * * Wireless leg of the A -> B link. Frames are byte-identical to the UART ones * and are handed to UARTReceiver::processFrame(), which dedupes on packet_id. * * Channel discovery: A transmits on ESPNOW_CHANNEL unless it is associated to * an access point. B listens on ESPNOW_CHANNEL first and, while it hears * nothing, hops through channels 1..13 until frames arrive, then locks. */ #ifndef ESPNOW_RECEIVER_H #define ESPNOW_RECEIVER_H #include namespace EspNowReceiver { /** * Bring the radio up in STA mode and register the receive callback. * @return true if ESP-NOW is listening */ bool init(); /** * Channel-hopping housekeeping. Call from loop(). */ void tick(); bool isReady(); uint8_t currentChannel(); uint32_t framesReceived(); } // namespace EspNowReceiver #endif // ESPNOW_RECEIVER_H