mirror of
https://github.com/Genaker/LoraSA.git
synced 2026-07-06 18:01:25 +02:00
Factor out bus configuration
This commit is contained in:
+2
-7
@@ -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() {};
|
||||
|
||||
Reference in New Issue
Block a user