Lightweight FlyBed1, structure based on KK-Board Firmware First this one should work, then I can get more complex FlyBed1 working :)
PC/PC.h@2:c2ebab7c189f, 2013-06-24 (annotated)
- Committer:
- maetugr
- Date:
- Mon Jun 24 14:19:15 2013 +0000
- Revision:
- 2:c2ebab7c189f
- Parent:
- 0:d51bf879e9df
latest changes online for Roland Elmiger
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
maetugr | 0:d51bf879e9df | 1 | #include "mbed.h" |
maetugr | 0:d51bf879e9df | 2 | |
maetugr | 0:d51bf879e9df | 3 | #ifndef PC_H |
maetugr | 0:d51bf879e9df | 4 | #define PC_H |
maetugr | 0:d51bf879e9df | 5 | |
maetugr | 0:d51bf879e9df | 6 | #define COMMAND_MAX_LENGHT 300 |
maetugr | 0:d51bf879e9df | 7 | |
maetugr | 0:d51bf879e9df | 8 | class PC : public Serial |
maetugr | 0:d51bf879e9df | 9 | { |
maetugr | 0:d51bf879e9df | 10 | public: |
maetugr | 0:d51bf879e9df | 11 | PC(PinName tx, PinName rx, int baud); |
maetugr | 0:d51bf879e9df | 12 | void cls(); // to clear the display |
maetugr | 0:d51bf879e9df | 13 | void locate(int column, int row); // to relocate the cursor |
maetugr | 0:d51bf879e9df | 14 | void readcommand(void (*executer)(char*)); // to read a char from the pc to the command string |
maetugr | 0:d51bf879e9df | 15 | |
maetugr | 0:d51bf879e9df | 16 | char command[COMMAND_MAX_LENGHT]; |
maetugr | 0:d51bf879e9df | 17 | private: |
maetugr | 0:d51bf879e9df | 18 | int command_char_count; |
maetugr | 0:d51bf879e9df | 19 | }; |
maetugr | 0:d51bf879e9df | 20 | #endif |