begin cleanup on radio abstraction, details below:

* to allow changing to new mesh transport
* to allow a different chipset for the radio
* to allow testing on hardware with a SimRadio
* new "bare" build env for a devboard with virtually no hardware
* make buttons optional
This commit is contained in:
geeksville
2020-03-31 21:56:35 -07:00
parent 17de6f9532
commit da74803ffb
10 changed files with 206 additions and 48 deletions

15
src/RadioInterface.cpp Normal file
View File

@@ -0,0 +1,15 @@
#include "CustomRF95.h"
#include "NodeDB.h"
#include "assert.h"
#include "configuration.h"
#include <pb_decode.h>
#include <pb_encode.h>
RadioInterface::RadioInterface(MemoryPool<MeshPacket> &_pool, PointerQueue<MeshPacket> &_rxDest) : pool(_pool), rxDest(_rxDest) {}
ErrorCode SimRadio::send(MeshPacket *p)
{
DEBUG_MSG("SimRadio.send\n");
pool.release(p);
return ERRNO_OK;
}