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 GA-Test_copy by
PC/PC.h@0:a3b83d366423, 2017-12-06 (annotated)
- Committer:
- aungriah
- Date:
- Wed Dec 06 21:35:45 2017 +0000
- Revision:
- 0:a3b83d366423
- Child:
- 1:346279def7ac
test
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| aungriah | 0:a3b83d366423 | 1 | #include "mbed.h" |
| aungriah | 0:a3b83d366423 | 2 | |
| aungriah | 0:a3b83d366423 | 3 | #ifndef PC_H |
| aungriah | 0:a3b83d366423 | 4 | #define PC_H |
| aungriah | 0:a3b83d366423 | 5 | |
| aungriah | 0:a3b83d366423 | 6 | #define COMMAND_MAX_LENGHT 300 |
| aungriah | 0:a3b83d366423 | 7 | |
| aungriah | 0:a3b83d366423 | 8 | class PC : public Serial |
| aungriah | 0:a3b83d366423 | 9 | { |
| aungriah | 0:a3b83d366423 | 10 | public: |
| aungriah | 0:a3b83d366423 | 11 | PC(PinName tx, PinName rx, int baud); |
| aungriah | 0:a3b83d366423 | 12 | void cls(); // to clear the display |
| aungriah | 0:a3b83d366423 | 13 | void locate(int column, int row); // to relocate the cursor |
| aungriah | 0:a3b83d366423 | 14 | void readcommand(void (*executer)(char*)); // to read a char from the pc to the command string |
| aungriah | 0:a3b83d366423 | 15 | |
| aungriah | 0:a3b83d366423 | 16 | char command[COMMAND_MAX_LENGHT]; |
| aungriah | 0:a3b83d366423 | 17 | private: |
| aungriah | 0:a3b83d366423 | 18 | int command_char_count; |
| aungriah | 0:a3b83d366423 | 19 | }; |
| aungriah | 0:a3b83d366423 | 20 | #endif |
| aungriah | 0:a3b83d366423 | 21 |
