Alejandro Ungria Hirte / GA-Berkay_Alex

Dependencies:   mbed-dev

Fork of GA-Test_copy by Huseyin Berkay Berabi

PC/PC.h

Committer:
bberabi
Date:
2017-12-09
Revision:
1:346279def7ac
Parent:
0:a3b83d366423
Child:
3:8bee1711d186

File content as of revision 1:346279def7ac:

#include "mbed.h"

#ifndef PC_H
#define PC_H

#define COMMAND_MAX_LENGHT 300

class PC : public Serial 
{
    public:
        PC(PinName tx, PinName rx, int baud);
        void cls();                                                                        // to clear the display
        void locate(int column, int row);                                                  // to relocate the cursor
        void readcommand(void (*executer)(char*));                  // to read a char from the pc to the command string
        
        char command[COMMAND_MAX_LENGHT];
    private:
        int command_char_count;
};
#endif