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.
Dependencies: mbed-rtos VodafoneUSBModem mbed
Console.h
- Committer:
- ashleymills
- Date:
- 2012-08-15
- Revision:
- 1:719c0f047c34
- Parent:
- 0:6c831cc49d22
- Child:
- 2:8cc63f7a24cf
File content as of revision 1:719c0f047c34:
#pragma once
#include "mbed.h"
#define BUFFER_WAIT_TIMEOUT 1000000
class Console {
private:
int _currentLine;
int _usedLines;
int _bufferWaitTimeout;
char **_lines;
int _linePos;
int _prevLinePos;
bool waitForInput();
void loadPreviousBuffer();
void loadNextBuffer();
void virtual processCommand();
void printLineBuffer();
void printHistory();
void printBuffer(int index);
void reprintBuffer();
void storeBuffer();
void clearBuffer();
protected:
char *_lineBuffer;
int _lineLength;
int _numLines;
Serial *_terminal;
public:
Console(Serial *terminal, int lineLength, int numLines);
~Console();
void virtual update();
};

