mirror of https://github.com/meshcore-dev/MeshCore
46 changed files with 955 additions and 145 deletions
@ -0,0 +1,103 @@ |
|||
#include "ESPNOWRadio.h" |
|||
#include <esp_now.h> |
|||
#include <WiFi.h> |
|||
#include <esp_wifi.h> |
|||
|
|||
static uint8_t broadcastAddress[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; |
|||
static esp_now_peer_info_t peerInfo; |
|||
static bool is_send_complete = false; |
|||
static esp_err_t last_send_result; |
|||
static uint8_t rx_buf[256]; |
|||
static uint8_t last_rx_len = 0; |
|||
|
|||
// callback when data is sent
|
|||
static void OnDataSent(const uint8_t *mac_addr, esp_now_send_status_t status) { |
|||
is_send_complete = true; |
|||
ESPNOW_DEBUG_PRINTLN("Send Status: %d", (int)status); |
|||
} |
|||
|
|||
static void OnDataRecv(const uint8_t *mac, const uint8_t *data, int len) { |
|||
ESPNOW_DEBUG_PRINTLN("Recv: len = %d", len); |
|||
memcpy(rx_buf, data, len); |
|||
last_rx_len = len; |
|||
} |
|||
|
|||
void ESPNOWRadio::begin() { |
|||
// Set device as a Wi-Fi Station
|
|||
WiFi.mode(WIFI_STA); |
|||
// Long Range mode
|
|||
esp_wifi_set_protocol(WIFI_IF_STA, WIFI_PROTOCOL_LR); |
|||
|
|||
// Init ESP-NOW
|
|||
if (esp_now_init() != ESP_OK) { |
|||
ESPNOW_DEBUG_PRINTLN("Error initializing ESP-NOW"); |
|||
return; |
|||
} |
|||
|
|||
esp_wifi_set_max_tx_power(80); // should be 20dBm
|
|||
|
|||
esp_now_register_send_cb(OnDataSent); |
|||
esp_now_register_recv_cb(OnDataRecv); |
|||
|
|||
// Register peer
|
|||
memcpy(peerInfo.peer_addr, broadcastAddress, 6); |
|||
peerInfo.channel = 0; |
|||
peerInfo.encrypt = false; |
|||
|
|||
// Add peer
|
|||
if (esp_now_add_peer(&peerInfo) == ESP_OK) { |
|||
ESPNOW_DEBUG_PRINTLN("init success"); |
|||
} else { |
|||
// ESPNOW_DEBUG_PRINTLN("Failed to add peer");
|
|||
} |
|||
} |
|||
|
|||
void ESPNOWRadio::setTxPower(uint8_t dbm) { |
|||
esp_wifi_set_max_tx_power(dbm * 4); |
|||
} |
|||
|
|||
uint32_t ESPNOWRadio::intID() { |
|||
uint8_t mac[8]; |
|||
memset(mac, 0, sizeof(mac)); |
|||
esp_efuse_mac_get_default(mac); |
|||
uint32_t n, m; |
|||
memcpy(&n, &mac[0], 4); |
|||
memcpy(&m, &mac[4], 4); |
|||
|
|||
return n + m; |
|||
} |
|||
|
|||
void ESPNOWRadio::startSendRaw(const uint8_t* bytes, int len) { |
|||
// Send message via ESP-NOW
|
|||
is_send_complete = false; |
|||
esp_err_t result = esp_now_send(broadcastAddress, bytes, len); |
|||
if (result == ESP_OK) { |
|||
ESPNOW_DEBUG_PRINTLN("Send success"); |
|||
} else { |
|||
last_send_result = result; |
|||
is_send_complete = true; |
|||
ESPNOW_DEBUG_PRINTLN("Send failed: %d", result); |
|||
} |
|||
} |
|||
|
|||
bool ESPNOWRadio::isSendComplete() { |
|||
return is_send_complete; |
|||
} |
|||
void ESPNOWRadio::onSendFinished() { |
|||
} |
|||
|
|||
float ESPNOWRadio::getLastRSSI() const { return 0; } |
|||
float ESPNOWRadio::getLastSNR() const { return 0; } |
|||
|
|||
int ESPNOWRadio::recvRaw(uint8_t* bytes, int sz) { |
|||
int len = last_rx_len; |
|||
if (last_rx_len > 0) { |
|||
memcpy(bytes, rx_buf, last_rx_len); |
|||
last_rx_len = 0; |
|||
} |
|||
return len; |
|||
} |
|||
|
|||
uint32_t ESPNOWRadio::getEstAirtimeFor(int len_bytes) { |
|||
return 4; // Fast AF
|
|||
} |
|||
@ -0,0 +1,36 @@ |
|||
#pragma once |
|||
|
|||
#include <Mesh.h> |
|||
|
|||
class ESPNOWRadio : public mesh::Radio { |
|||
protected: |
|||
uint32_t n_recv, n_sent; |
|||
|
|||
public: |
|||
ESPNOWRadio() { n_recv = n_sent = 0; } |
|||
|
|||
void begin() override; |
|||
int recvRaw(uint8_t* bytes, int sz) override; |
|||
uint32_t getEstAirtimeFor(int len_bytes) override; |
|||
void startSendRaw(const uint8_t* bytes, int len) override; |
|||
bool isSendComplete() override; |
|||
void onSendFinished() override; |
|||
|
|||
uint32_t getPacketsRecv() const { return n_recv; } |
|||
uint32_t getPacketsSent() const { return n_sent; } |
|||
virtual float getLastRSSI() const override; |
|||
virtual float getLastSNR() const override; |
|||
|
|||
float packetScore(float snr, int packet_len) override { return 0; } |
|||
uint32_t intID(); |
|||
void setTxPower(uint8_t dbm); |
|||
}; |
|||
|
|||
#if ESPNOW_DEBUG_LOGGING && ARDUINO |
|||
#include <Arduino.h> |
|||
#define ESPNOW_DEBUG_PRINT(F, ...) Serial.printf("ESP-Now: " F, ##__VA_ARGS__) |
|||
#define ESPNOW_DEBUG_PRINTLN(F, ...) Serial.printf("ESP-Now: " F "\n", ##__VA_ARGS__) |
|||
#else |
|||
#define ESPNOW_DEBUG_PRINT(...) {} |
|||
#define ESPNOW_DEBUG_PRINTLN(...) {} |
|||
#endif |
|||
@ -1,5 +1,5 @@ |
|||
#include <Arduino.h> |
|||
#include "faketecBoard.h" |
|||
#include "FaketecBoard.h" |
|||
|
|||
#include <bluefruit.h> |
|||
#include <Wire.h> |
|||
@ -0,0 +1,83 @@ |
|||
|
|||
; ----------- Generic ESP32-C3 ------------ |
|||
|
|||
[Generic_ESPNOW] |
|||
extends = esp32_base |
|||
board = esp32-c3-devkitm-1 |
|||
;board = esp32-s3-devkitm-1 |
|||
build_flags = |
|||
${esp32_base.build_flags} |
|||
-I variants/generic_espnow |
|||
; -D ESP32_CPU_FREQ=80 |
|||
-D PIN_BOARD_SDA=-1 |
|||
-D PIN_BOARD_SCL=-1 |
|||
; -D P_LORA_TX_LED=8 |
|||
-D PIN_USER_BTN=0 |
|||
; -D ARDUINO_USB_MODE=1 |
|||
; -D ARDUINO_USB_CDC_ON_BOOT=1 |
|||
; -D ESPNOW_DEBUG_LOGGING=1 |
|||
; -D MESH_PACKET_LOGGING=1 |
|||
; -D MESH_DEBUG=1 |
|||
build_src_filter = ${esp32_base.build_src_filter} |
|||
+<helpers/esp32/ESPNowRadio.cpp> |
|||
+<../variants/generic_espnow> |
|||
|
|||
[env:Generic_ESPNOW_terminal_chat] |
|||
extends = Generic_ESPNOW |
|||
build_flags = |
|||
${Generic_ESPNOW.build_flags} |
|||
-D MAX_CONTACTS=100 |
|||
-D MAX_GROUP_CHANNELS=1 |
|||
build_src_filter = ${Generic_ESPNOW.build_src_filter} |
|||
+<../examples/simple_secure_chat/main.cpp> |
|||
lib_deps = |
|||
${Generic_ESPNOW.lib_deps} |
|||
densaugeo/base64 @ ~1.4.0 |
|||
|
|||
[env:Generic_ESPNOW_repeatr] |
|||
extends = Generic_ESPNOW |
|||
build_flags = |
|||
${Generic_ESPNOW.build_flags} |
|||
-D ADVERT_NAME='"ESPNOW Repeater"' |
|||
-D ADVERT_LAT=-37.0 |
|||
-D ADVERT_LON=145.0 |
|||
-D ADMIN_PASSWORD='"password"' |
|||
build_src_filter = ${Generic_ESPNOW.build_src_filter} |
|||
+<../examples/simple_repeater/main.cpp> |
|||
lib_deps = |
|||
${Generic_ESPNOW.lib_deps} |
|||
${esp32_ota.lib_deps} |
|||
densaugeo/base64 @ ~1.4.0 |
|||
|
|||
[env:Generic_ESPNOW_comp_radio_usb] |
|||
extends = Generic_ESPNOW |
|||
build_flags = |
|||
${Generic_ESPNOW.build_flags} |
|||
-D MAX_CONTACTS=100 |
|||
-D MAX_GROUP_CHANNELS=8 |
|||
; -D ENABLE_PRIVATE_KEY_IMPORT=1 |
|||
; -D ENABLE_PRIVATE_KEY_EXPORT=1 |
|||
; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1 |
|||
; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1 |
|||
; NOTE: DO NOT ENABLE --> -D ESPNOW_DEBUG_LOGGING=1 |
|||
build_src_filter = ${Generic_ESPNOW.build_src_filter} |
|||
+<../examples/companion_radio/main.cpp> |
|||
lib_deps = |
|||
${Generic_ESPNOW.lib_deps} |
|||
densaugeo/base64 @ ~1.4.0 |
|||
|
|||
[env:Generic_ESPNOW_room_svr] |
|||
extends = Generic_ESPNOW |
|||
build_flags = |
|||
${Generic_ESPNOW.build_flags} |
|||
-D ADVERT_NAME='"Heltec Room"' |
|||
-D ADVERT_LAT=-37.0 |
|||
-D ADVERT_LON=145.0 |
|||
-D ADMIN_PASSWORD='"password"' |
|||
-D ROOM_PASSWORD='"hello"' |
|||
build_src_filter = ${Generic_ESPNOW.build_src_filter} |
|||
+<../examples/simple_room_server/main.cpp> |
|||
lib_deps = |
|||
${Generic_ESPNOW.lib_deps} |
|||
${esp32_ota.lib_deps} |
|||
|
|||
@ -0,0 +1,33 @@ |
|||
#include <Arduino.h> |
|||
#include "target.h" |
|||
#include <helpers/ArduinoHelpers.h> |
|||
|
|||
ESP32Board board; |
|||
|
|||
ESPNOWRadio radio_driver; |
|||
|
|||
ESP32RTCClock rtc_clock; |
|||
|
|||
bool radio_init() { |
|||
rtc_clock.begin(); |
|||
|
|||
// NOTE: radio_driver.begin() is called by Dispatcher::begin(), so not needed here
|
|||
return true; // success
|
|||
} |
|||
|
|||
uint32_t radio_get_rng_seed() { |
|||
return millis() + radio_driver.intID(); // TODO: where to get some entropy?
|
|||
} |
|||
|
|||
void radio_set_params(float freq, float bw, uint8_t sf, uint8_t cr) { |
|||
// no-op
|
|||
} |
|||
|
|||
void radio_set_tx_power(uint8_t dbm) { |
|||
radio_driver.setTxPower(dbm); |
|||
} |
|||
|
|||
mesh::LocalIdentity radio_new_identity() { |
|||
StdRNG rng; // TODO: need stronger True-RNG here
|
|||
return mesh::LocalIdentity(&rng); // create new random identity
|
|||
} |
|||
@ -0,0 +1,14 @@ |
|||
#pragma once |
|||
|
|||
#include <helpers/ESP32Board.h> |
|||
#include <helpers/esp32/ESPNOWRadio.h> |
|||
|
|||
extern ESP32Board board; |
|||
extern ESPNOWRadio radio_driver; |
|||
extern ESP32RTCClock rtc_clock; |
|||
|
|||
bool radio_init(); |
|||
uint32_t radio_get_rng_seed(); |
|||
void radio_set_params(float freq, float bw, uint8_t sf, uint8_t cr); |
|||
void radio_set_tx_power(uint8_t dbm); |
|||
mesh::LocalIdentity radio_new_identity(); |
|||
@ -1,9 +1,18 @@ |
|||
#pragma once |
|||
|
|||
#define RADIOLIB_STATIC_ONLY 1 |
|||
#include <RadioLib.h> |
|||
#include <helpers/RadioLibWrappers.h> |
|||
#include <helpers/HeltecV2Board.h> |
|||
#include <helpers/CustomSX1276Wrapper.h> |
|||
#include <helpers/AutoDiscoverRTCClock.h> |
|||
|
|||
extern HeltecV2Board board; |
|||
extern RADIO_CLASS radio; |
|||
extern WRAPPER_CLASS radio_driver; |
|||
extern AutoDiscoverRTCClock rtc_clock; |
|||
|
|||
bool radio_init(); |
|||
uint32_t radio_get_rng_seed(); |
|||
void radio_set_params(float freq, float bw, uint8_t sf, uint8_t cr); |
|||
void radio_set_tx_power(uint8_t dbm); |
|||
mesh::LocalIdentity radio_new_identity(); |
|||
|
|||
@ -1,9 +1,18 @@ |
|||
#pragma once |
|||
|
|||
#define RADIOLIB_STATIC_ONLY 1 |
|||
#include <RadioLib.h> |
|||
#include <helpers/RadioLibWrappers.h> |
|||
#include <helpers/HeltecV3Board.h> |
|||
#include <helpers/CustomSX1262Wrapper.h> |
|||
#include <helpers/AutoDiscoverRTCClock.h> |
|||
|
|||
extern HeltecV3Board board; |
|||
extern RADIO_CLASS radio; |
|||
extern WRAPPER_CLASS radio_driver; |
|||
extern AutoDiscoverRTCClock rtc_clock; |
|||
|
|||
bool radio_init(); |
|||
uint32_t radio_get_rng_seed(); |
|||
void radio_set_params(float freq, float bw, uint8_t sf, uint8_t cr); |
|||
void radio_set_tx_power(uint8_t dbm); |
|||
mesh::LocalIdentity radio_new_identity(); |
|||
|
|||
@ -1,9 +1,18 @@ |
|||
#pragma once |
|||
|
|||
#define RADIOLIB_STATIC_ONLY 1 |
|||
#include <RadioLib.h> |
|||
#include <helpers/RadioLibWrappers.h> |
|||
#include <helpers/ESP32Board.h> |
|||
#include <helpers/CustomSX1262Wrapper.h> |
|||
#include <helpers/AutoDiscoverRTCClock.h> |
|||
|
|||
extern ESP32Board board; |
|||
extern RADIO_CLASS radio; |
|||
extern WRAPPER_CLASS radio_driver; |
|||
extern AutoDiscoverRTCClock rtc_clock; |
|||
|
|||
bool radio_init(); |
|||
uint32_t radio_get_rng_seed(); |
|||
void radio_set_params(float freq, float bw, uint8_t sf, uint8_t cr); |
|||
void radio_set_tx_power(uint8_t dbm); |
|||
mesh::LocalIdentity radio_new_identity(); |
|||
|
|||
@ -1,9 +1,18 @@ |
|||
#pragma once |
|||
|
|||
#define RADIOLIB_STATIC_ONLY 1 |
|||
#include <RadioLib.h> |
|||
#include <helpers/RadioLibWrappers.h> |
|||
#include <helpers/TBeamBoard.h> |
|||
#include <helpers/CustomSX1276Wrapper.h> |
|||
#include <helpers/AutoDiscoverRTCClock.h> |
|||
|
|||
extern TBeamBoard board; |
|||
extern RADIO_CLASS radio; |
|||
extern WRAPPER_CLASS radio_driver; |
|||
extern AutoDiscoverRTCClock rtc_clock; |
|||
|
|||
bool radio_init(); |
|||
uint32_t radio_get_rng_seed(); |
|||
void radio_set_params(float freq, float bw, uint8_t sf, uint8_t cr); |
|||
void radio_set_tx_power(uint8_t dbm); |
|||
mesh::LocalIdentity radio_new_identity(); |
|||
|
|||
@ -1,9 +1,18 @@ |
|||
#pragma once |
|||
|
|||
#define RADIOLIB_STATIC_ONLY 1 |
|||
#include <RadioLib.h> |
|||
#include <helpers/RadioLibWrappers.h> |
|||
#include <helpers/LilyGoTLoraBoard.h> |
|||
#include <helpers/CustomSX1276Wrapper.h> |
|||
#include <helpers/AutoDiscoverRTCClock.h> |
|||
|
|||
extern LilyGoTLoraBoard board; |
|||
extern RADIO_CLASS radio; |
|||
extern WRAPPER_CLASS radio_driver; |
|||
extern AutoDiscoverRTCClock rtc_clock; |
|||
|
|||
bool radio_init(); |
|||
uint32_t radio_get_rng_seed(); |
|||
void radio_set_params(float freq, float bw, uint8_t sf, uint8_t cr); |
|||
void radio_set_tx_power(uint8_t dbm); |
|||
mesh::LocalIdentity radio_new_identity(); |
|||
|
|||
@ -1,10 +1,19 @@ |
|||
#pragma once |
|||
|
|||
#define RADIOLIB_STATIC_ONLY 1 |
|||
#include <RadioLib.h> |
|||
#include <helpers/RadioLibWrappers.h> |
|||
#include <helpers/nrf52/FaketecBoard.h> |
|||
#include <helpers/CustomSX1262Wrapper.h> |
|||
#include <helpers/CustomLLCC68Wrapper.h> |
|||
#include <helpers/AutoDiscoverRTCClock.h> |
|||
|
|||
extern FaketecBoard board; |
|||
extern RADIO_CLASS radio; |
|||
extern WRAPPER_CLASS radio_driver; |
|||
extern AutoDiscoverRTCClock rtc_clock; |
|||
|
|||
bool radio_init(); |
|||
uint32_t radio_get_rng_seed(); |
|||
void radio_set_params(float freq, float bw, uint8_t sf, uint8_t cr); |
|||
void radio_set_tx_power(uint8_t dbm); |
|||
mesh::LocalIdentity radio_new_identity(); |
|||
|
|||
@ -1,9 +1,18 @@ |
|||
#pragma once |
|||
|
|||
#define RADIOLIB_STATIC_ONLY 1 |
|||
#include <RadioLib.h> |
|||
#include <helpers/RadioLibWrappers.h> |
|||
#include <helpers/nrf52/RAK4631Board.h> |
|||
#include <helpers/CustomSX1262Wrapper.h> |
|||
#include <helpers/AutoDiscoverRTCClock.h> |
|||
|
|||
extern RAK4631Board board; |
|||
extern RADIO_CLASS radio; |
|||
extern WRAPPER_CLASS radio_driver; |
|||
extern AutoDiscoverRTCClock rtc_clock; |
|||
|
|||
bool radio_init(); |
|||
uint32_t radio_get_rng_seed(); |
|||
void radio_set_params(float freq, float bw, uint8_t sf, uint8_t cr); |
|||
void radio_set_tx_power(uint8_t dbm); |
|||
mesh::LocalIdentity radio_new_identity(); |
|||
|
|||
@ -1,9 +1,18 @@ |
|||
#pragma once |
|||
|
|||
#define RADIOLIB_STATIC_ONLY 1 |
|||
#include <RadioLib.h> |
|||
#include <helpers/RadioLibWrappers.h> |
|||
#include <helpers/StationG2Board.h> |
|||
#include <helpers/CustomSX1262Wrapper.h> |
|||
#include <helpers/AutoDiscoverRTCClock.h> |
|||
|
|||
extern StationG2Board board; |
|||
extern RADIO_CLASS radio; |
|||
extern WRAPPER_CLASS radio_driver; |
|||
extern AutoDiscoverRTCClock rtc_clock; |
|||
|
|||
bool radio_init(); |
|||
uint32_t radio_get_rng_seed(); |
|||
void radio_set_params(float freq, float bw, uint8_t sf, uint8_t cr); |
|||
void radio_set_tx_power(uint8_t dbm); |
|||
mesh::LocalIdentity radio_new_identity(); |
|||
|
|||
@ -1,9 +1,18 @@ |
|||
#pragma once |
|||
|
|||
#define RADIOLIB_STATIC_ONLY 1 |
|||
#include <RadioLib.h> |
|||
#include <helpers/RadioLibWrappers.h> |
|||
#include <helpers/nrf52/T1000eBoard.h> |
|||
#include <helpers/CustomLR1110Wrapper.h> |
|||
#include <helpers/AutoDiscoverRTCClock.h> |
|||
|
|||
extern T1000eBoard board; |
|||
extern RADIO_CLASS radio; |
|||
extern WRAPPER_CLASS radio_driver; |
|||
extern AutoDiscoverRTCClock rtc_clock; |
|||
|
|||
bool radio_init(); |
|||
uint32_t radio_get_rng_seed(); |
|||
void radio_set_params(float freq, float bw, uint8_t sf, uint8_t cr); |
|||
void radio_set_tx_power(uint8_t dbm); |
|||
mesh::LocalIdentity radio_new_identity(); |
|||
|
|||
@ -1,9 +1,18 @@ |
|||
#pragma once |
|||
|
|||
#define RADIOLIB_STATIC_ONLY 1 |
|||
#include <RadioLib.h> |
|||
#include <helpers/RadioLibWrappers.h> |
|||
#include <helpers/nrf52/T114Board.h> |
|||
#include <helpers/CustomSX1262Wrapper.h> |
|||
#include <helpers/AutoDiscoverRTCClock.h> |
|||
|
|||
extern T114Board board; |
|||
extern RADIO_CLASS radio; |
|||
extern WRAPPER_CLASS radio_driver; |
|||
extern AutoDiscoverRTCClock rtc_clock; |
|||
|
|||
bool radio_init(); |
|||
uint32_t radio_get_rng_seed(); |
|||
void radio_set_params(float freq, float bw, uint8_t sf, uint8_t cr); |
|||
void radio_set_tx_power(uint8_t dbm); |
|||
mesh::LocalIdentity radio_new_identity(); |
|||
|
|||
@ -1,9 +1,18 @@ |
|||
#pragma once |
|||
|
|||
#define RADIOLIB_STATIC_ONLY 1 |
|||
#include <RadioLib.h> |
|||
#include <helpers/RadioLibWrappers.h> |
|||
#include <helpers/nrf52/TechoBoard.h> |
|||
#include <helpers/CustomSX1262Wrapper.h> |
|||
#include <helpers/AutoDiscoverRTCClock.h> |
|||
|
|||
extern TechoBoard board; |
|||
extern RADIO_CLASS radio; |
|||
extern WRAPPER_CLASS radio_driver; |
|||
extern AutoDiscoverRTCClock rtc_clock; |
|||
|
|||
bool radio_init(); |
|||
uint32_t radio_get_rng_seed(); |
|||
void radio_set_params(float freq, float bw, uint8_t sf, uint8_t cr); |
|||
void radio_set_tx_power(uint8_t dbm); |
|||
mesh::LocalIdentity radio_new_identity(); |
|||
|
|||
@ -1,10 +1,19 @@ |
|||
#pragma once |
|||
|
|||
#define RADIOLIB_STATIC_ONLY 1 |
|||
#include <RadioLib.h> |
|||
#include <helpers/RadioLibWrappers.h> |
|||
#include <helpers/XiaoC3Board.h> |
|||
#include <helpers/CustomSX1262Wrapper.h> |
|||
#include <helpers/CustomSX1268Wrapper.h> |
|||
#include <helpers/AutoDiscoverRTCClock.h> |
|||
|
|||
extern XiaoC3Board board; |
|||
extern RADIO_CLASS radio; |
|||
extern WRAPPER_CLASS radio_driver; |
|||
extern AutoDiscoverRTCClock rtc_clock; |
|||
|
|||
bool radio_init(); |
|||
uint32_t radio_get_rng_seed(); |
|||
void radio_set_params(float freq, float bw, uint8_t sf, uint8_t cr); |
|||
void radio_set_tx_power(uint8_t dbm); |
|||
mesh::LocalIdentity radio_new_identity(); |
|||
|
|||
@ -1,9 +1,18 @@ |
|||
#pragma once |
|||
|
|||
#define RADIOLIB_STATIC_ONLY 1 |
|||
#include <RadioLib.h> |
|||
#include <helpers/RadioLibWrappers.h> |
|||
#include <helpers/ESP32Board.h> |
|||
#include <helpers/CustomSX1262Wrapper.h> |
|||
#include <helpers/AutoDiscoverRTCClock.h> |
|||
|
|||
extern ESP32Board board; |
|||
extern RADIO_CLASS radio; |
|||
extern WRAPPER_CLASS radio_driver; |
|||
extern AutoDiscoverRTCClock rtc_clock; |
|||
|
|||
bool radio_init(); |
|||
uint32_t radio_get_rng_seed(); |
|||
void radio_set_params(float freq, float bw, uint8_t sf, uint8_t cr); |
|||
void radio_set_tx_power(uint8_t dbm); |
|||
mesh::LocalIdentity radio_new_identity(); |
|||
|
|||
Loading…
Reference in new issue