Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of frdm_echo by
shell.h@14:73ef945b8def, 2014-04-24 (annotated)
- Committer:
- silverpanda
- Date:
- Thu Apr 24 23:27:17 2014 +0000
- Revision:
- 14:73ef945b8def
- Parent:
- 13:019e24491f32
- Child:
- 15:a32db434af65
added Pi
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
silverpanda | 5:03b7c237c4c4 | 1 | #ifndef shell__h__ |
silverpanda | 5:03b7c237c4c4 | 2 | #define shell__h__ |
silverpanda | 5:03b7c237c4c4 | 3 | |
silverpanda | 13:019e24491f32 | 4 | #include "PushButtons.h" |
silverpanda | 9:f9efd3a69c2d | 5 | #define ItsInputBufferSize_ 24 |
silverpanda | 8:b715912d684b | 6 | |
silverpanda | 5:03b7c237c4c4 | 7 | class Shell { |
silverpanda | 5:03b7c237c4c4 | 8 | public: |
silverpanda | 5:03b7c237c4c4 | 9 | Shell(uint32_t); |
silverpanda | 12:b846b64e3980 | 10 | void sendStartMessage(); |
silverpanda | 5:03b7c237c4c4 | 11 | void scanUSBSerialRx(); |
silverpanda | 13:019e24491f32 | 12 | void reportPushButtonPress(ePushButton); |
silverpanda | 5:03b7c237c4c4 | 13 | private: |
silverpanda | 9:f9efd3a69c2d | 14 | bool addCharacterToBuffer(char); |
silverpanda | 8:b715912d684b | 15 | void finishCharacterBuffer(); |
silverpanda | 11:4c6c6d6c0ebe | 16 | void sendExample(); |
silverpanda | 11:4c6c6d6c0ebe | 17 | char lowercase(char); |
silverpanda | 13:019e24491f32 | 18 | void sendText(char *); |
silverpanda | 14:73ef945b8def | 19 | void parseGenerate(); |
silverpanda | 14:73ef945b8def | 20 | void generatePi(); |
silverpanda | 5:03b7c237c4c4 | 21 | |
silverpanda | 5:03b7c237c4c4 | 22 | Serial *usbSerial; |
silverpanda | 8:b715912d684b | 23 | char inputBuffer[ItsInputBufferSize_]; |
silverpanda | 8:b715912d684b | 24 | uint32_t characterCount, characterPointer; |
silverpanda | 11:4c6c6d6c0ebe | 25 | bool findString(char *); |
silverpanda | 9:f9efd3a69c2d | 26 | void parseCommands(); |
silverpanda | 12:b846b64e3980 | 27 | void parseLEDState(); |
silverpanda | 5:03b7c237c4c4 | 28 | }; |
silverpanda | 5:03b7c237c4c4 | 29 | |
silverpanda | 5:03b7c237c4c4 | 30 | #endif |