Henk Meewis / Mbed 2 deprecated USB_serial_LED_controller

Dependencies:   mbed

Fork of frdm_echo by Henk Meewis

shell.h

Committer:
silverpanda
Date:
2014-04-14
Revision:
9:f9efd3a69c2d
Parent:
8:b715912d684b
Child:
11:4c6c6d6c0ebe

File content as of revision 9:f9efd3a69c2d:

#ifndef shell__h__
#define shell__h__

#define ItsInputBufferSize_ 24

class Shell {
public:
    Shell(uint32_t);
    void sendHelloWorld();
    void scanUSBSerialRx();
private:
    void sendText(char *);
    bool addCharacterToBuffer(char);
    void finishCharacterBuffer();

    Serial *usbSerial;
    char inputBuffer[ItsInputBufferSize_];
    uint32_t characterCount, characterPointer;
    bool findString(char *, uint32_t);
    void parseCommands();
};

#endif