Files
MeshCore-Posadmesh/variants/nibble_screen_connect/target.cpp
T
Jared Dohrman 7cfaed45c9 Merge remote-tracking branch 'upstream/dev' into integration/upstream-dev-20260505
# Conflicts:
#	.github/workflows/github-pages.yml
#	.github/workflows/pr-build-check.yml
#	README.md
#	docs/cli_commands.md
#	docs/companion_protocol.md
#	docs/faq.md
#	docs/number_allocations.md
#	mkdocs.yml
#	variants/heltec_v3/platformio.ini
2026-05-05 17:30:48 +10:00

35 lines
695 B
C++

#include <Arduino.h>
#include "target.h"
ESP32Board board;
static SPIClass spi;
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, spi);
WRAPPER_CLASS radio_driver(radio, board);
ESP32RTCClock fallback_clock;
AutoDiscoverRTCClock rtc_clock(fallback_clock);
SensorManager sensors;
#ifdef DISPLAY_CLASS
DISPLAY_CLASS display;
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
#endif
#ifndef LORA_CR
#define LORA_CR 5
#endif
bool radio_init() {
fallback_clock.begin();
rtc_clock.begin(Wire);
return radio.std_init(&spi);
}
mesh::LocalIdentity radio_new_identity() {
RadioNoiseListener rng(radio);
return mesh::LocalIdentity(&rng);
}