C++ Wrapper around the IBM LMiC LoRaWAN implementation
Diff: Node.h
- Revision:
- 10:9bf05e9b4cde
- Parent:
- 9:cfe697b53d71
--- a/Node.h Sun Oct 16 09:57:58 2016 +0200 +++ b/Node.h Tue Nov 22 20:43:03 2016 +0100 @@ -24,9 +24,15 @@ #ifndef SIMPLE_LORAWAN_NODE_H_ #define SIMPLE_LORAWAN_NODE_H_ +#define RFM95_RESET_CONNECTED 1 // define if p15 is connected to RFM95W reset + #include "lmic.h" #include "stdint.h" +#ifdef RFM95_RESET_CONNECTED +#include "mbed.h" +#endif + namespace SimpleLoRaWAN { @@ -36,6 +42,7 @@ Node(); virtual ~Node(); void send(char* data, int size); + void send(uint8_t* data, int size); static void onEvent(ev_t ev); void process(); @@ -43,9 +50,14 @@ void disableLinkCheck(); void setLinkCheck(int state); + void setSpreadFactor(int spreadfactor); + private: void init(); void setLinkCheck(); +#ifdef RFM95_RESET_CONNECTED + DigitalOut rfm95wReset; +#endif }; } /* namespace SimpleLoRaWAN */