Damian Herman / Mbed 2 deprecated NetrunnerMain

Dependencies:   mbed

include/SerialPrompt.h

Committer:
overkiller
Date:
2015-06-24
Revision:
3:def8a92db030
Child:
4:cc391b3f3e57

File content as of revision 3:def8a92db030:

#ifndef SERIALPROMPT_H
#define SERIALPROMPT_H
#include "mbed.h"
const char* prompt = "$>";
void displayPrompt(Serial* pcConnection)
{
    pcConnection->printf(prompt);
}
int getInput(Serial* pcConnection)
{
    if(pcConnection->readable())
    {
        pcConnection->printf(pcConnection->getc());
    }
}
#endif // SERIALPROMPT_H