mirror of https://github.com/meshcore-dev/MeshCore
7 changed files with 11 additions and 123 deletions
@ -1,52 +0,0 @@ |
|||||
; ----------- Elecrow Panels ESP32-S3 ------------ |
|
||||
; No LoRa module - Only ESP-NOW |
|
||||
; Works with repeaters with esp_now |
|
||||
[Elecrow_ESPNOW] |
|
||||
extends = esp32_base |
|
||||
board = esp32-s3-devkitc-1-myboard |
|
||||
build_flags = |
|
||||
${esp32_base.build_flags} |
|
||||
-I variants/Elecrow_espnow |
|
||||
-D LORA_FREQ=869.525 |
|
||||
-D LORA_BW=250 |
|
||||
-D LORA_SF=11 |
|
||||
-D LORA_CR=5 |
|
||||
-D PIN_BOARD_SDA=-1 |
|
||||
-D PIN_BOARD_SCL=-1 |
|
||||
-D PIN_USER_BTN=0 |
|
||||
; -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/Elecrow_espnow> |
|
||||
|
|
||||
[env:Elecrow_ESPNOW_terminal_chat] |
|
||||
extends = Elecrow_ESPNOW |
|
||||
build_flags = |
|
||||
${Elecrow_ESPNOW.build_flags} |
|
||||
-I./include |
|
||||
-D${PIOENV} |
|
||||
-D CORE_DEBUG_LEVEL=4 ; 0: None, 1: Error, 2: Warn, 3: Info, 4: Debug, 5: Verbose |
|
||||
-D LV_CONF_PATH=lv_conf.h |
|
||||
-D ELECROW_DISPLAY_50 |
|
||||
-D CLIENT_WITHOUT_LORA |
|
||||
-D LANG_GR |
|
||||
-D ADVERT_NAME='"Elecrow Terminal"' |
|
||||
-D MAX_CONTACTS=350 |
|
||||
-D MAX_GROUP_CHANNELS=8 |
|
||||
-D MESH_DEBUG=1 |
|
||||
-D BOARD_HAS_PSRAM=1 |
|
||||
build_src_filter = ${Elecrow_ESPNOW.build_src_filter} |
|
||||
+<../examples/simple_secure_chat_ui/*.cpp> |
|
||||
+<fonts/*.c> |
|
||||
+<UI/*.c> |
|
||||
lib_deps = |
|
||||
${esp32_base.lib_deps} |
|
||||
adafruit/Adafruit SSD1306 @ ^2.5.15 |
|
||||
fbiego/ESP32Time@^2.0.6 |
|
||||
lvgl/[email protected] |
|
||||
lovyan03/LovyanGFX@^1.1.16 |
|
||||
bitbank2/PNGdec@^1.1.6 |
|
||||
tamctec/TAMC_GT911@^1.0.2 |
|
||||
densaugeo/base64 @ ~1.4.0 |
|
||||
@ -1,44 +0,0 @@ |
|||||
#include <Arduino.h> |
|
||||
#include "target.h" |
|
||||
#include <helpers/ArduinoHelpers.h> |
|
||||
|
|
||||
ESP32Board board; |
|
||||
|
|
||||
ESPNOWRadio radio_driver; |
|
||||
|
|
||||
ESP32RTCClock rtc_clock; |
|
||||
SensorManager sensors; |
|
||||
|
|
||||
bool radio_init() { |
|
||||
rtc_clock.begin(); |
|
||||
|
|
||||
radio_driver.init(); |
|
||||
|
|
||||
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); |
|
||||
} |
|
||||
|
|
||||
// NOTE: as we are using the WiFi radio, the ESP_IDF will have enabled hardware RNG:
|
|
||||
// https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/system/random.html
|
|
||||
class ESP_RNG : public mesh::RNG { |
|
||||
public: |
|
||||
void random(uint8_t* dest, size_t sz) override { |
|
||||
esp_fill_random(dest, sz); |
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
mesh::LocalIdentity radio_new_identity() { |
|
||||
ESP_RNG rng; |
|
||||
return mesh::LocalIdentity(&rng); // create new random identity
|
|
||||
} |
|
||||
@ -1,16 +0,0 @@ |
|||||
#pragma once |
|
||||
|
|
||||
#include <helpers/ESP32Board.h> |
|
||||
#include <helpers/esp32/ESPNOWRadio.h> |
|
||||
#include <helpers/SensorManager.h> |
|
||||
|
|
||||
extern ESP32Board board; |
|
||||
extern ESPNOWRadio radio_driver; |
|
||||
extern ESP32RTCClock rtc_clock; |
|
||||
extern SensorManager sensors; |
|
||||
|
|
||||
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