Elmo Terminal provides functionality to test Lora radio and access SX1272 chip registers delivered with Elmo board. This firmware allows the user to control the LoRa radio parameters (eg. frequency, bandwidth, spreading factor etc.) by entering console commands via serial terminal. Application also contains "Ping-Pong" and data transmission functionalities.
Fork of Elmo-Terminal by
Terminal.h@12:26045241f50f, 2015-10-22 (annotated)
- Committer:
- WGorniak
- Date:
- Thu Oct 22 08:03:32 2015 +0000
- Revision:
- 12:26045241f50f
- Parent:
- 2:8d8295a51f68
updated sx lib
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
WGorniak | 2:8d8295a51f68 | 1 | #ifndef _TERMINAL_HPP_ |
WGorniak | 2:8d8295a51f68 | 2 | #define _TERMINAL_HPP_ |
WGorniak | 2:8d8295a51f68 | 3 | |
WGorniak | 2:8d8295a51f68 | 4 | #include <list> |
WGorniak | 2:8d8295a51f68 | 5 | #include <string> |
WGorniak | 2:8d8295a51f68 | 6 | #include "mbed.h" |
WGorniak | 2:8d8295a51f68 | 7 | #include "CmdFactory.h" |
WGorniak | 2:8d8295a51f68 | 8 | #include "dbg.h" |
WGorniak | 2:8d8295a51f68 | 9 | |
WGorniak | 2:8d8295a51f68 | 10 | |
WGorniak | 2:8d8295a51f68 | 11 | class Terminal |
WGorniak | 2:8d8295a51f68 | 12 | { |
WGorniak | 2:8d8295a51f68 | 13 | public: |
WGorniak | 2:8d8295a51f68 | 14 | Terminal(Settings* settings, Serial *serial, InterruptIn* pinStart); |
WGorniak | 2:8d8295a51f68 | 15 | ~Terminal(); |
WGorniak | 2:8d8295a51f68 | 16 | |
WGorniak | 2:8d8295a51f68 | 17 | void start(void); |
WGorniak | 2:8d8295a51f68 | 18 | void executeCmd(string rxBuffer); |
WGorniak | 2:8d8295a51f68 | 19 | |
WGorniak | 2:8d8295a51f68 | 20 | private: |
WGorniak | 2:8d8295a51f68 | 21 | void buttonPressed(); |
WGorniak | 2:8d8295a51f68 | 22 | |
WGorniak | 2:8d8295a51f68 | 23 | static list<string> tokenize(const string& str, const string& delimiters = " "); |
WGorniak | 2:8d8295a51f68 | 24 | |
WGorniak | 2:8d8295a51f68 | 25 | Settings* settings_; |
WGorniak | 2:8d8295a51f68 | 26 | Serial *serial_; |
WGorniak | 2:8d8295a51f68 | 27 | InterruptIn* pinStart_; |
WGorniak | 2:8d8295a51f68 | 28 | volatile bool buttonStart_; |
WGorniak | 2:8d8295a51f68 | 29 | |
WGorniak | 2:8d8295a51f68 | 30 | CmdFactory *cmdFactory_; |
WGorniak | 2:8d8295a51f68 | 31 | |
WGorniak | 2:8d8295a51f68 | 32 | }; |
WGorniak | 2:8d8295a51f68 | 33 | |
WGorniak | 2:8d8295a51f68 | 34 | #endif |