Library for 3.2'' uLcd Picaso Display4D system Picaso Serial Environment Command Set web: http://www.4dsystems.com.au/product/20/67/Processors_Graphics/PICASO/
Diff: PicasoSerial.h
- Revision:
- 1:a74e42cf52b2
- Parent:
- 0:65fd8b1cbf86
diff -r 65fd8b1cbf86 -r a74e42cf52b2 PicasoSerial.h --- a/PicasoSerial.h Sun Jul 06 10:36:27 2014 +0000 +++ b/PicasoSerial.h Sun Apr 05 13:54:48 2015 +0000 @@ -10,8 +10,8 @@ * Picaso Serial Environment Command Set * http://www.4dsystems.com.au/product/20/67/Processors_Graphics/PICASO/ * @autor A.Decarvalho -* -*17/04/ 2014 +* +*17/02/ 2015 */ //-------------------- @@ -68,6 +68,8 @@ #define GFX_BAUD_19200 0x0008 #define GFX_BAUD_56000 11 #define GFX_BAUD_115200 0x000D +#define GFX_BAUD_128000 0x000E +#define GFX_BAUD_256000 0x000F //----------------- typedef char* XCHAR; @@ -78,23 +80,22 @@ //-------------------- // The States //-------------------- -typedef enum State State; -enum State{ +enum State { BUTTON_STATE_PRESSED = 0, BUTTON_STATE_RELEASED=1, // LED_STATE_ON, LED_STATE_OFF, // - SWITCH_STATE_ON, - SWITCH_STATE_OFF, + SWITCHER_STATE_ON, + SWITCHER_STATE_OFF, // SLIDER_STATE_MOVE, SLIDER_STATE_RELEASED, // - INPUT_STATE_PRESSED_UP, - INPUT_STATE_PRESSED_DOWN, - INPUT_STATE_RELEASED, + SCALER_STATE_PRESSED_UP, + SCALER_STATE_PRESSED_DOWN, + SCALER_STATE_RELEASED, // LABEL_STATE_ON, // @@ -111,8 +112,6 @@ //------------ // fonts uLCD //------------ -typedef enum Font Font; -// enum Font { FONT_1 = 0x0000, FONT_2 = 0x0001, @@ -121,8 +120,6 @@ //----------------- // Colors for Obj //----------------- -typedef enum Color Color; -// enum Color { ALICEBLUE = 0xF7DF,ANTIQUEWHITE = 0xFF5A,AQUA = 0x07FF, AQUAMARINE = 0x7FFA,AZURE = 0xF7FF,BEIGE = 0xF7BB, @@ -173,8 +170,6 @@ YELLOWGREEN = 0x9E66 }; //------------------------------------------------------ -typedef enum TouchEvent TouchEvent; - enum TouchEvent { EVENT_NO_ACTIVITY = 0x0000, EVENT_PRESS = 0x0001, @@ -182,13 +177,13 @@ EVENT_MOVE = 0x0003 }; //------------------------------------------------------- -enum GRAPHIC_OBJ_TYPE { +enum WIDGET_TYPE { OBJ_BUTTON=1, OBJ_LED, OBJ_LABEL, - OBJ_INPUT, + OBJ_SCALER, OBJ_SLIDER, - OBJ_SWITCH, + OBJ_SWITCHER, OBJ_DIGIT_LED, OBJ_DIGITAL_3_LED, @@ -198,11 +193,10 @@ OBJ_ELLIPSE, OBJ_DIAMOND, OBJ_ISOCELE, + OBJ_SEGMENT, OBJ_UNKNOW }; //------------------------------------------------------- -typedef struct GraphicMessage GraphicMessage; - struct GraphicMessage { TouchEvent event; UINT16 objId; @@ -362,8 +356,8 @@ //------------------------------- void text_backround(Color color); //------------------------------ - void text_putstring(string str); - + void text_putstring(string str); + //------------------------------- void text_setFont(Font _font); //--------------------------------- @@ -378,7 +372,7 @@ * @params color_bckg the background color */ void draw_string(string str, UINT16 x, UINT16 y,Font _font,Color text_color,Color color_bckg); - + //--------------------------------------------------------------------------------- //! Draw a diamond [x1,y1],[x2,y2],[x3,y3],[x4,y4]