76#ifndef USER_ESP_NOW_UTILS_H_
77#define USER_ESP_NOW_UTILS_H_
88#include <soc/gpio_num.h>
89#include <driver/uart.h>
98typedef enum __attribute__((packed))
116typedef void (*
hostEspNowRecvCb_t)(
const esp_now_recv_info_t* esp_now_info,
const uint8_t* data, uint8_t len,
132void espNowSend(
const char* data, uint8_t len);
void deinitEspNow(void)
Definition hdw-esp-now.c:633
void(* hostEspNowRecvCb_t)(const esp_now_recv_info_t *esp_now_info, const uint8_t *data, uint8_t len, int8_t rssi)
A function typedef for a callback called when an ESP-NOW packet is received.
Definition hdw-esp-now.h:116
void(* hostEspNowSendCb_t)(const uint8_t *mac_addr, esp_now_send_status_t status)
A function typedef for a callback called when an ESP-NOW packet transmission finishes.
Definition hdw-esp-now.h:123
void checkEspNowRxQueue(void)
Definition hdw-esp-now.c:417
wifiMode_t
The different WiFi modes.
Definition hdw-esp-now.h:99
@ ESP_NOW_IMMEDIATE
ESP-NOW packets are delivered to Swadge modes from the interrupt.
Definition hdw-esp-now.h:102
@ ESP_NOW
ESP-NOW packets are delivered to Swadge modes from the main loop.
Definition hdw-esp-now.h:101
@ NO_WIFI
WiFi is not used at all. This saves power.
Definition hdw-esp-now.h:100
void espNowUseSerial(bool crossoverPins)
Definition hdw-esp-now.c:339
esp_err_t espNowUseWireless(void)
Definition hdw-esp-now.c:258
esp_err_t initEspNow(hostEspNowRecvCb_t recvCb, hostEspNowSendCb_t sendCb, gpio_num_t rx, gpio_num_t tx, uart_port_t uart, wifiMode_t wifiMode)
Definition hdw-esp-now.c:119
void espNowSend(const char *data, uint8_t len)
Definition hdw-esp-now.c:559