mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-23 03:00:56 +00:00
add protobufs
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
typedef int ErrorCode;
|
||||
typedef uint8_t NodeNum;
|
||||
|
||||
/// Callback for a receive packet
|
||||
typedef void (*MeshRXHandler)(NodeNum from, NodeNum to, std::string packet);
|
||||
|
||||
/**
|
||||
* A raw low level interface to our mesh. Only understands nodenums and bytes (not protobufs or node ids)
|
||||
@@ -22,13 +24,15 @@ public:
|
||||
ErrorCode sendTo(NodeNum dest, const uint8_t *buf, size_t len);
|
||||
|
||||
/// Do loop callback operations (we currently FIXME poll the receive mailbox here)
|
||||
/// for received packets it will call the rx handler
|
||||
void loop();
|
||||
|
||||
void setRXHandler(MeshRXHandler h) { rxHandler = h; }
|
||||
|
||||
private:
|
||||
RH_RF95 rf95; // the raw radio interface
|
||||
RHMesh manager;
|
||||
|
||||
MeshRXHandler rxHandler;
|
||||
};
|
||||
|
||||
extern MeshRadio radio;
|
||||
|
||||
Reference in New Issue
Block a user