mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* new helper for ESP32: SerialBLEInterface
* Some refactoring in BaseChatMesh and Terminal Chat * new companion_radio example
This commit is contained in:
parent
52f9c358b7
commit
d9dc76f197
8 changed files with 1000 additions and 9 deletions
21
src/helpers/BaseSerialInterface.h
Normal file
21
src/helpers/BaseSerialInterface.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#define MAX_FRAME_SIZE 160
|
||||
|
||||
class BaseSerialInterface {
|
||||
protected:
|
||||
BaseSerialInterface() { }
|
||||
|
||||
public:
|
||||
virtual void enable() = 0;
|
||||
virtual void disable() = 0;
|
||||
virtual bool isEnabled() const = 0;
|
||||
|
||||
virtual bool isConnected() const = 0;
|
||||
|
||||
virtual bool isWriteBusy() const = 0;
|
||||
virtual size_t writeFrame(const uint8_t src[], size_t len) = 0;
|
||||
virtual size_t checkRecvFrame(uint8_t dest[]) = 0;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue