diff -r 7fd00015f62f -r 4567e7bc404c tools/picctldisplaytest/src/picctldisplaytest.h --- a/tools/picctldisplaytest/src/picctldisplaytest.h Thu Apr 23 19:10:12 2009 +0200 +++ b/tools/picctldisplaytest/src/picctldisplaytest.h Thu Apr 23 20:22:04 2009 +0200 @@ -32,7 +32,8 @@ void print_cli_options(); int dec2bcd(int decimal); int bcd2dec(int bcd); -void signal_handler_IO (int status); +void DecodeCMD (); +void read_data(); bool write_gfx_ram(const unsigned char * buffer, int numbytes); static const unsigned char CMD_DISP_CLEAR_SCREEN[] = {0xAA,0x10,0x00,0x00}; @@ -41,8 +42,20 @@ static const unsigned char CMD_GET_CLOCK_MEMORY[] = {0xAA,0x40,0x00,0x00}; static unsigned char CMD_SET_PWM1[] = {0xAA,0x45,0x00,0x01,0x00}; static unsigned char CMD_SET_PWM2[] = {0xAA,0x46,0x00,0x01,0x00}; +static unsigned char CMD_BOOT[] = {0xAA,0x80,0x00,0x00}; #define BAUDRATE B921600 + +const unsigned char CMD_HDR_SYNC = 0; +const unsigned char CMD_HDR_COMMAND = 1; +const unsigned char CMD_HDR_LENGTH = 2; +const unsigned char CMD_DATA_START = 4; + +const unsigned char CMD_SYNC_SEND = 0xAA; +const unsigned char CMD_SYNC_RECV = 0x55; +const unsigned char CMD_ESCAPE_BYTE = 0x42; + + /*! \brief configuration set by command line */ struct config { bool debug;