Factor out bus configuration

This commit is contained in:
Sassa NF
2025-01-26 22:33:37 +00:00
parent c7727fb527
commit 2b1da5ae4a
11 changed files with 453 additions and 61 deletions
+2 -7
View File
@@ -5,14 +5,9 @@
#include <LoRaBoards.h>
#include <LiLyGo.h>
#include <bus.h>
#include <config.h>
#ifndef ARDUINO_USB_CDC_ON_BOOT
#define SERIAL0 Serial
#else
#define SERIAL0 Serial0
#endif
#ifndef SCAN_MAX_RESULT_KHZ_SCALE
// kHz scale: round frequency, so it fits into 2 bytes
// 2500000 / 40 = 62500, scale 40 fits 2.5GHz into two bytes
@@ -135,7 +130,7 @@ struct Comms
struct NoopComms : Comms
{
NoopComms() : Comms("no-op", SERIAL0) {};
NoopComms() : Comms("no-op", Uart0) {};
virtual bool send(Message &) { return true; };
virtual void _onReceive() {};