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.
PC/PC.h@47:b6120c152ad1, 2015-03-19 (annotated)
- Committer:
- manumaet
- Date:
- Thu Mar 19 12:54:28 2015 +0000
- Revision:
- 47:b6120c152ad1
- Parent:
- 0:f50e671ffff7
final release with the code used in the verification test case
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| manumaet | 0:f50e671ffff7 | 1 | #include "mbed.h" |
| manumaet | 0:f50e671ffff7 | 2 | |
| manumaet | 0:f50e671ffff7 | 3 | #ifndef PC_H |
| manumaet | 0:f50e671ffff7 | 4 | #define PC_H |
| manumaet | 0:f50e671ffff7 | 5 | |
| manumaet | 0:f50e671ffff7 | 6 | #define COMMAND_MAX_LENGHT 300 |
| manumaet | 0:f50e671ffff7 | 7 | |
| manumaet | 0:f50e671ffff7 | 8 | class PC : public Serial |
| manumaet | 0:f50e671ffff7 | 9 | { |
| manumaet | 0:f50e671ffff7 | 10 | public: |
| manumaet | 0:f50e671ffff7 | 11 | PC(PinName tx, PinName rx, int baud); |
| manumaet | 0:f50e671ffff7 | 12 | void cls(); // to clear the display |
| manumaet | 0:f50e671ffff7 | 13 | void locate(int column, int row); // to relocate the cursor |
| manumaet | 0:f50e671ffff7 | 14 | void readcommand(void (*executer)(char*)); // to read a char from the pc to the command string |
| manumaet | 0:f50e671ffff7 | 15 | |
| manumaet | 0:f50e671ffff7 | 16 | char command[COMMAND_MAX_LENGHT]; |
| manumaet | 0:f50e671ffff7 | 17 | private: |
| manumaet | 0:f50e671ffff7 | 18 | int command_char_count; |
| manumaet | 0:f50e671ffff7 | 19 | }; |
| manumaet | 0:f50e671ffff7 | 20 | #endif |