uVGA III library
Dependents: CDUFinal CDU_Mbed_21 CDU_Mbed_26 CDU_Mbed_30
Fork of 4DGL by
TFT_4DGL.h@1:ebc67b51c225, 2014-06-26 (annotated)
- Committer:
- WillemBraat
- Date:
- Thu Jun 26 11:28:11 2014 +0000
- Revision:
- 1:ebc67b51c225
- Parent:
- 0:d6e186427f3e
- Child:
- 3:f34ce48346bc
uVGA Library
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AdamGreen | 0:d6e186427f3e | 1 | // |
AdamGreen | 0:d6e186427f3e | 2 | // TFT_4DGL is a class to drive 4D Systems TFT touch screens |
AdamGreen | 0:d6e186427f3e | 3 | // |
AdamGreen | 0:d6e186427f3e | 4 | // Copyright (C) <2010> Stephane ROCHON <stephane.rochon at free.fr> |
AdamGreen | 0:d6e186427f3e | 5 | // |
AdamGreen | 0:d6e186427f3e | 6 | // TFT_4DGL is free software: you can redistribute it and/or modify |
AdamGreen | 0:d6e186427f3e | 7 | // it under the terms of the GNU General Public License as published by |
AdamGreen | 0:d6e186427f3e | 8 | // the Free Software Foundation, either version 3 of the License, or |
AdamGreen | 0:d6e186427f3e | 9 | // (at your option) any later version. |
AdamGreen | 0:d6e186427f3e | 10 | // |
AdamGreen | 0:d6e186427f3e | 11 | // TFT_4DGL is distributed in the hope that it will be useful, |
AdamGreen | 0:d6e186427f3e | 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
AdamGreen | 0:d6e186427f3e | 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
AdamGreen | 0:d6e186427f3e | 14 | // GNU General Public License for more details. |
AdamGreen | 0:d6e186427f3e | 15 | // |
AdamGreen | 0:d6e186427f3e | 16 | // You should have received a copy of the GNU General Public License |
AdamGreen | 0:d6e186427f3e | 17 | // along with TFT_4DGL. If not, see <http://www.gnu.org/licenses/>. |
AdamGreen | 0:d6e186427f3e | 18 | |
AdamGreen | 0:d6e186427f3e | 19 | // @author Stephane Rochon |
AdamGreen | 0:d6e186427f3e | 20 | |
AdamGreen | 0:d6e186427f3e | 21 | #include "mbed.h" |
AdamGreen | 0:d6e186427f3e | 22 | |
AdamGreen | 0:d6e186427f3e | 23 | // Debug Verbose on terminal enabled |
AdamGreen | 0:d6e186427f3e | 24 | #ifndef DEBUGMODE |
WillemBraat | 1:ebc67b51c225 | 25 | #define DEBUGMODE 0 |
AdamGreen | 0:d6e186427f3e | 26 | #endif |
AdamGreen | 0:d6e186427f3e | 27 | |
AdamGreen | 0:d6e186427f3e | 28 | // Common WAIT value in millisecond |
AdamGreen | 0:d6e186427f3e | 29 | #define TEMPO 5 |
AdamGreen | 0:d6e186427f3e | 30 | |
AdamGreen | 0:d6e186427f3e | 31 | // 4DGL Functions values |
AdamGreen | 0:d6e186427f3e | 32 | #define AUTOBAUD '\x55' |
AdamGreen | 0:d6e186427f3e | 33 | #define CLS '\x45' |
AdamGreen | 0:d6e186427f3e | 34 | #define BAUDRATE '\x51' |
AdamGreen | 0:d6e186427f3e | 35 | #define VERSION '\x56' |
AdamGreen | 0:d6e186427f3e | 36 | #define BCKGDCOLOR '\x42' |
AdamGreen | 0:d6e186427f3e | 37 | #define DISPCONTROL '\x59' |
AdamGreen | 0:d6e186427f3e | 38 | #define SETVOLUME '\x76' |
AdamGreen | 0:d6e186427f3e | 39 | #define CIRCLE '\x43' |
AdamGreen | 0:d6e186427f3e | 40 | #define TRIANGLE '\x47' |
AdamGreen | 0:d6e186427f3e | 41 | #define LINE '\x4C' |
AdamGreen | 0:d6e186427f3e | 42 | #define RECTANGLE '\x72' |
AdamGreen | 0:d6e186427f3e | 43 | #define ELLIPSE '\x65' |
AdamGreen | 0:d6e186427f3e | 44 | #define PIXEL '\x50' |
AdamGreen | 0:d6e186427f3e | 45 | #define READPIXEL '\x52' |
AdamGreen | 0:d6e186427f3e | 46 | #define SCREENCOPY '\x63' |
AdamGreen | 0:d6e186427f3e | 47 | #define PENSIZE '\x70' |
AdamGreen | 0:d6e186427f3e | 48 | #define SETFONT '\x46' |
AdamGreen | 0:d6e186427f3e | 49 | #define TEXTMODE '\x4F' |
AdamGreen | 0:d6e186427f3e | 50 | #define TEXTCHAR '\x54' |
AdamGreen | 0:d6e186427f3e | 51 | #define GRAPHCHAR '\x74' |
AdamGreen | 0:d6e186427f3e | 52 | #define TEXTSTRING '\x73' |
AdamGreen | 0:d6e186427f3e | 53 | #define GRAPHSTRING '\x53' |
AdamGreen | 0:d6e186427f3e | 54 | #define TEXTBUTTON '\x62' |
AdamGreen | 0:d6e186427f3e | 55 | #define GETTOUCH '\x6F' |
AdamGreen | 0:d6e186427f3e | 56 | #define WAITTOUCH '\x77' |
AdamGreen | 0:d6e186427f3e | 57 | #define SETTOUCH '\x75' |
AdamGreen | 0:d6e186427f3e | 58 | |
AdamGreen | 0:d6e186427f3e | 59 | |
AdamGreen | 0:d6e186427f3e | 60 | // Screen answers |
AdamGreen | 0:d6e186427f3e | 61 | #define ACK '\x06' |
AdamGreen | 0:d6e186427f3e | 62 | #define NAK '\x15' |
AdamGreen | 0:d6e186427f3e | 63 | |
AdamGreen | 0:d6e186427f3e | 64 | // Screen states |
AdamGreen | 0:d6e186427f3e | 65 | #define OFF '\x00' |
AdamGreen | 0:d6e186427f3e | 66 | #define ON '\x01' |
AdamGreen | 0:d6e186427f3e | 67 | |
AdamGreen | 0:d6e186427f3e | 68 | // Graphics modes |
AdamGreen | 0:d6e186427f3e | 69 | #define SOLID '\x00' |
AdamGreen | 0:d6e186427f3e | 70 | #define WIREFRAME '\x01' |
AdamGreen | 0:d6e186427f3e | 71 | |
AdamGreen | 0:d6e186427f3e | 72 | // Text modes |
AdamGreen | 0:d6e186427f3e | 73 | #define TRANSPARENT '\x00' |
AdamGreen | 0:d6e186427f3e | 74 | #define OPAQUE '\x01' |
AdamGreen | 0:d6e186427f3e | 75 | |
AdamGreen | 0:d6e186427f3e | 76 | // Fonts Sizes |
WillemBraat | 1:ebc67b51c225 | 77 | #define FONT_15X17 '\x00' |
WillemBraat | 1:ebc67b51c225 | 78 | #define FONT_24X34 '\x01' |
AdamGreen | 0:d6e186427f3e | 79 | |
AdamGreen | 0:d6e186427f3e | 80 | // Touch Values |
AdamGreen | 0:d6e186427f3e | 81 | #define WAIT '\x00' |
AdamGreen | 0:d6e186427f3e | 82 | #define PRESS '\x01' |
AdamGreen | 0:d6e186427f3e | 83 | #define RELEASE '\x02' |
AdamGreen | 0:d6e186427f3e | 84 | #define MOVE '\x03' |
AdamGreen | 0:d6e186427f3e | 85 | #define STATUS '\x04' |
AdamGreen | 0:d6e186427f3e | 86 | #define GETPOSITION '\x05' |
AdamGreen | 0:d6e186427f3e | 87 | |
AdamGreen | 0:d6e186427f3e | 88 | // Data speed |
AdamGreen | 0:d6e186427f3e | 89 | #define BAUD_110 '\x00' |
AdamGreen | 0:d6e186427f3e | 90 | #define BAUD_300 '\x01' |
AdamGreen | 0:d6e186427f3e | 91 | #define BAUD_600 '\x02' |
AdamGreen | 0:d6e186427f3e | 92 | #define BAUD_1200 '\x03' |
AdamGreen | 0:d6e186427f3e | 93 | #define BAUD_2400 '\x04' |
AdamGreen | 0:d6e186427f3e | 94 | #define BAUD_4800 '\x05' |
AdamGreen | 0:d6e186427f3e | 95 | #define BAUD_9600 '\x06' |
AdamGreen | 0:d6e186427f3e | 96 | #define BAUD_14400 '\x07' |
AdamGreen | 0:d6e186427f3e | 97 | #define BAUD_19200 '\x09' |
AdamGreen | 0:d6e186427f3e | 98 | #define BAUD_31250 '\x09' |
AdamGreen | 0:d6e186427f3e | 99 | #define BAUD_38400 '\x0A' |
AdamGreen | 0:d6e186427f3e | 100 | #define BAUD_56000 '\x0B' |
AdamGreen | 0:d6e186427f3e | 101 | #define BAUD_57600 '\x0C' |
AdamGreen | 0:d6e186427f3e | 102 | #define BAUD_115200 '\x0D' |
AdamGreen | 0:d6e186427f3e | 103 | #define BAUD_128000 '\x0E' |
AdamGreen | 0:d6e186427f3e | 104 | #define BAUD_256000 '\x0F' |
AdamGreen | 0:d6e186427f3e | 105 | |
AdamGreen | 0:d6e186427f3e | 106 | // Defined Colors |
WillemBraat | 1:ebc67b51c225 | 107 | #define WHITE 0xFFFFFF //define as 0xRRGGBB |
AdamGreen | 0:d6e186427f3e | 108 | #define BLACK 0x000000 |
AdamGreen | 0:d6e186427f3e | 109 | #define RED 0xFF0000 |
AdamGreen | 0:d6e186427f3e | 110 | #define GREEN 0x00FF00 |
AdamGreen | 0:d6e186427f3e | 111 | #define BLUE 0x0000FF |
AdamGreen | 0:d6e186427f3e | 112 | #define LGREY 0xBFBFBF |
AdamGreen | 0:d6e186427f3e | 113 | #define DGREY 0x5F5F5F |
AdamGreen | 0:d6e186427f3e | 114 | |
AdamGreen | 0:d6e186427f3e | 115 | // Mode data |
AdamGreen | 0:d6e186427f3e | 116 | #define BACKLIGHT '\x00' |
AdamGreen | 0:d6e186427f3e | 117 | #define DISPLAY '\x01' |
AdamGreen | 0:d6e186427f3e | 118 | #define CONTRAST '\x02' |
AdamGreen | 0:d6e186427f3e | 119 | #define POWER '\x03' |
AdamGreen | 0:d6e186427f3e | 120 | #define ORIENTATION '\x04' |
AdamGreen | 0:d6e186427f3e | 121 | #define TOUCH_CTRL '\x05' |
AdamGreen | 0:d6e186427f3e | 122 | #define IMAGE_FORMAT '\x06' |
AdamGreen | 0:d6e186427f3e | 123 | #define PROTECT_FAT '\x08' |
AdamGreen | 0:d6e186427f3e | 124 | |
AdamGreen | 0:d6e186427f3e | 125 | // change this to your specific screen (newer versions) if needed |
AdamGreen | 0:d6e186427f3e | 126 | // Startup orientation is PORTRAIT so SIZE_X must be lesser than SIZE_Y |
WillemBraat | 1:ebc67b51c225 | 127 | // Startup default is 320x240 graphics |
WillemBraat | 1:ebc67b51c225 | 128 | |
WillemBraat | 1:ebc67b51c225 | 129 | //320x240 |
WillemBraat | 1:ebc67b51c225 | 130 | //#define SIZE_X 240 |
WillemBraat | 1:ebc67b51c225 | 131 | //#define SIZE_Y 320 |
WillemBraat | 1:ebc67b51c225 | 132 | |
WillemBraat | 1:ebc67b51c225 | 133 | //640x480 |
WillemBraat | 1:ebc67b51c225 | 134 | #define SIZE_X 480 |
WillemBraat | 1:ebc67b51c225 | 135 | #define SIZE_Y 640 |
WillemBraat | 1:ebc67b51c225 | 136 | |
WillemBraat | 1:ebc67b51c225 | 137 | //800x480 |
WillemBraat | 1:ebc67b51c225 | 138 | //#define SIZE_X 480 |
WillemBraat | 1:ebc67b51c225 | 139 | //#define SIZE_Y 800 |
AdamGreen | 0:d6e186427f3e | 140 | |
AdamGreen | 0:d6e186427f3e | 141 | #define IS_LANDSCAPE 0 |
AdamGreen | 0:d6e186427f3e | 142 | #define IS_PORTRAIT 1 |
AdamGreen | 0:d6e186427f3e | 143 | |
AdamGreen | 0:d6e186427f3e | 144 | // Screen orientation |
AdamGreen | 0:d6e186427f3e | 145 | #define LANDSCAPE '\x01' |
AdamGreen | 0:d6e186427f3e | 146 | #define LANDSCAPE_R '\x02' |
AdamGreen | 0:d6e186427f3e | 147 | #define PORTRAIT '\x03' |
AdamGreen | 0:d6e186427f3e | 148 | #define PORTRAIT_R '\x04' |
AdamGreen | 0:d6e186427f3e | 149 | |
AdamGreen | 0:d6e186427f3e | 150 | // Parameters |
AdamGreen | 0:d6e186427f3e | 151 | #define ENABLE '\x00' |
AdamGreen | 0:d6e186427f3e | 152 | #define DISABLE '\x01' |
AdamGreen | 0:d6e186427f3e | 153 | #define RESET '\x02' |
AdamGreen | 0:d6e186427f3e | 154 | |
AdamGreen | 0:d6e186427f3e | 155 | #define NEW '\x00' |
AdamGreen | 0:d6e186427f3e | 156 | #define OLD '\x01' |
AdamGreen | 0:d6e186427f3e | 157 | |
AdamGreen | 0:d6e186427f3e | 158 | #define DOWN '\x00' |
AdamGreen | 0:d6e186427f3e | 159 | #define UP '\x01' |
AdamGreen | 0:d6e186427f3e | 160 | |
AdamGreen | 0:d6e186427f3e | 161 | #define PROTECT '\x00' |
AdamGreen | 0:d6e186427f3e | 162 | #define UNPROTECT '\x02' |
AdamGreen | 0:d6e186427f3e | 163 | |
AdamGreen | 0:d6e186427f3e | 164 | //************************************************************************** |
AdamGreen | 0:d6e186427f3e | 165 | // \class TFT_4DGL TFT_4DGL.h |
AdamGreen | 0:d6e186427f3e | 166 | // \brief This is the main class. It shoud be used like this : TFT_4GDL myLCD(p9,p10,p11); |
AdamGreen | 0:d6e186427f3e | 167 | /** |
AdamGreen | 0:d6e186427f3e | 168 | Example: |
AdamGreen | 0:d6e186427f3e | 169 | * @code |
AdamGreen | 0:d6e186427f3e | 170 | * // Display a white circle on the screen |
AdamGreen | 0:d6e186427f3e | 171 | * #include "mbed.h" |
AdamGreen | 0:d6e186427f3e | 172 | * #include " TFT_4DGL.h" |
AdamGreen | 0:d6e186427f3e | 173 | * |
AdamGreen | 0:d6e186427f3e | 174 | * TFT_4GDL myLCD(p9,p10,p11); |
AdamGreen | 0:d6e186427f3e | 175 | * |
AdamGreen | 0:d6e186427f3e | 176 | * int main() { |
AdamGreen | 0:d6e186427f3e | 177 | * myLCD.circle(120, 160, 80, WHITE); |
AdamGreen | 0:d6e186427f3e | 178 | * } |
AdamGreen | 0:d6e186427f3e | 179 | * @endcode |
AdamGreen | 0:d6e186427f3e | 180 | */ |
AdamGreen | 0:d6e186427f3e | 181 | |
AdamGreen | 0:d6e186427f3e | 182 | class TFT_4DGL { |
AdamGreen | 0:d6e186427f3e | 183 | |
AdamGreen | 0:d6e186427f3e | 184 | public : |
AdamGreen | 0:d6e186427f3e | 185 | |
AdamGreen | 0:d6e186427f3e | 186 | TFT_4DGL(PinName tx, PinName rx, PinName rst); |
AdamGreen | 0:d6e186427f3e | 187 | |
AdamGreen | 0:d6e186427f3e | 188 | // General Commands ******************************************************************************* |
AdamGreen | 0:d6e186427f3e | 189 | |
AdamGreen | 0:d6e186427f3e | 190 | /** Clear the entire screen using the current background colour */ |
AdamGreen | 0:d6e186427f3e | 191 | void cls(); |
AdamGreen | 0:d6e186427f3e | 192 | |
AdamGreen | 0:d6e186427f3e | 193 | /** Reset screen */ |
AdamGreen | 0:d6e186427f3e | 194 | void reset(); |
AdamGreen | 0:d6e186427f3e | 195 | |
AdamGreen | 0:d6e186427f3e | 196 | /** Launch Autobaud for serial communication. This function is automatically called at startup */ |
AdamGreen | 0:d6e186427f3e | 197 | void autobaud(); |
WillemBraat | 1:ebc67b51c225 | 198 | |
AdamGreen | 0:d6e186427f3e | 199 | /** Set serial Baud rate (both sides : screen and mbed) |
AdamGreen | 0:d6e186427f3e | 200 | * @param Speed Correct BAUD value (see TFT_4DGL.h) |
AdamGreen | 0:d6e186427f3e | 201 | */ |
AdamGreen | 0:d6e186427f3e | 202 | void baudrate(int speed); |
AdamGreen | 0:d6e186427f3e | 203 | |
AdamGreen | 0:d6e186427f3e | 204 | /** Set background colour to the specified value |
AdamGreen | 0:d6e186427f3e | 205 | * @param color in HEX RGB like 0xFF00FF |
AdamGreen | 0:d6e186427f3e | 206 | */ |
AdamGreen | 0:d6e186427f3e | 207 | void background_color(int color); |
AdamGreen | 0:d6e186427f3e | 208 | |
AdamGreen | 0:d6e186427f3e | 209 | /** Set screen display mode to specific values |
AdamGreen | 0:d6e186427f3e | 210 | * @param mode See 4DGL documentation |
AdamGreen | 0:d6e186427f3e | 211 | * @param value See 4DGL documentation |
AdamGreen | 0:d6e186427f3e | 212 | */ |
AdamGreen | 0:d6e186427f3e | 213 | void display_control(char mode, char value); |
WillemBraat | 1:ebc67b51c225 | 214 | |
AdamGreen | 0:d6e186427f3e | 215 | |
AdamGreen | 0:d6e186427f3e | 216 | /** Set internal speaker to specified value |
AdamGreen | 0:d6e186427f3e | 217 | * @param value Correct range is 8 - 127 |
AdamGreen | 0:d6e186427f3e | 218 | */ |
AdamGreen | 0:d6e186427f3e | 219 | void set_volume(char value); |
AdamGreen | 0:d6e186427f3e | 220 | |
AdamGreen | 0:d6e186427f3e | 221 | // Graphics Commands ******************************************************************************* |
AdamGreen | 0:d6e186427f3e | 222 | |
AdamGreen | 0:d6e186427f3e | 223 | /** Draw a circle centered at x,y with a radius and a colour. It uses Pen Size stored value to draw a solid or wireframe circle |
AdamGreen | 0:d6e186427f3e | 224 | * @param x Horizontal position of the circle centre |
AdamGreen | 0:d6e186427f3e | 225 | * @param y Vertical position of the circle centre |
AdamGreen | 0:d6e186427f3e | 226 | * @param radius Radius of the circle |
AdamGreen | 0:d6e186427f3e | 227 | * @param color Circle color in HEX RGB like 0xFF00FF |
AdamGreen | 0:d6e186427f3e | 228 | */ |
AdamGreen | 0:d6e186427f3e | 229 | void circle(int x , int y , int radius, int color); |
AdamGreen | 0:d6e186427f3e | 230 | void triangle(int, int, int, int, int, int, int); |
AdamGreen | 0:d6e186427f3e | 231 | void line(int, int, int, int, int); |
AdamGreen | 0:d6e186427f3e | 232 | void rectangle(int, int, int, int, int); |
AdamGreen | 0:d6e186427f3e | 233 | void ellipse(int, int, int, int, int); |
AdamGreen | 0:d6e186427f3e | 234 | void pixel(int, int, int); |
WillemBraat | 1:ebc67b51c225 | 235 | void showpicture(int, int, int, int, int, int, int); |
AdamGreen | 0:d6e186427f3e | 236 | int read_pixel(int, int); |
AdamGreen | 0:d6e186427f3e | 237 | void screen_copy(int, int, int, int, int, int); |
AdamGreen | 0:d6e186427f3e | 238 | void pen_size(char); |
AdamGreen | 0:d6e186427f3e | 239 | |
AdamGreen | 0:d6e186427f3e | 240 | // Texts Commands |
AdamGreen | 0:d6e186427f3e | 241 | void set_font(char); |
AdamGreen | 0:d6e186427f3e | 242 | void text_mode(char); |
AdamGreen | 0:d6e186427f3e | 243 | void text_char(char, char, char, int); |
AdamGreen | 0:d6e186427f3e | 244 | void graphic_char(char, int, int, int, char, char); |
AdamGreen | 0:d6e186427f3e | 245 | void text_string(char *, char, char, char, int); |
AdamGreen | 0:d6e186427f3e | 246 | void graphic_string(char *, int, int, char, int, char, char); |
AdamGreen | 0:d6e186427f3e | 247 | void text_button(char *, char, int, int, int, char, int, char, char); |
AdamGreen | 0:d6e186427f3e | 248 | |
AdamGreen | 0:d6e186427f3e | 249 | void locate(char, char); |
AdamGreen | 0:d6e186427f3e | 250 | void color(int); |
AdamGreen | 0:d6e186427f3e | 251 | void putc(char); |
AdamGreen | 0:d6e186427f3e | 252 | void puts(char *); |
AdamGreen | 0:d6e186427f3e | 253 | |
AdamGreen | 0:d6e186427f3e | 254 | // Touch Command |
AdamGreen | 0:d6e186427f3e | 255 | void touch_mode(char); |
AdamGreen | 0:d6e186427f3e | 256 | void get_touch(int *, int *); |
AdamGreen | 0:d6e186427f3e | 257 | void wait_touch(int); |
AdamGreen | 0:d6e186427f3e | 258 | void set_touch(int, int, int, int); |
AdamGreen | 0:d6e186427f3e | 259 | int touch_status(void); |
AdamGreen | 0:d6e186427f3e | 260 | |
AdamGreen | 0:d6e186427f3e | 261 | // Screen Data |
AdamGreen | 0:d6e186427f3e | 262 | int type; |
AdamGreen | 0:d6e186427f3e | 263 | int revision; |
AdamGreen | 0:d6e186427f3e | 264 | int firmware; |
AdamGreen | 0:d6e186427f3e | 265 | int reserved1; |
AdamGreen | 0:d6e186427f3e | 266 | int reserved2; |
AdamGreen | 0:d6e186427f3e | 267 | |
AdamGreen | 0:d6e186427f3e | 268 | // Text data |
AdamGreen | 0:d6e186427f3e | 269 | char current_col; |
AdamGreen | 0:d6e186427f3e | 270 | char current_row; |
AdamGreen | 0:d6e186427f3e | 271 | int current_color; |
AdamGreen | 0:d6e186427f3e | 272 | char current_font; |
AdamGreen | 0:d6e186427f3e | 273 | char current_orientation; |
AdamGreen | 0:d6e186427f3e | 274 | char max_col; |
AdamGreen | 0:d6e186427f3e | 275 | char max_row; |
AdamGreen | 0:d6e186427f3e | 276 | |
AdamGreen | 0:d6e186427f3e | 277 | protected : |
AdamGreen | 0:d6e186427f3e | 278 | |
AdamGreen | 0:d6e186427f3e | 279 | Serial _cmd; |
AdamGreen | 0:d6e186427f3e | 280 | DigitalOut _rst; |
AdamGreen | 0:d6e186427f3e | 281 | |
AdamGreen | 0:d6e186427f3e | 282 | void freeBUFFER (void); |
AdamGreen | 0:d6e186427f3e | 283 | void writeBYTE (char); |
AdamGreen | 0:d6e186427f3e | 284 | int writeCOMMAND(char *, int); |
AdamGreen | 0:d6e186427f3e | 285 | int readVERSION (char *, int); |
AdamGreen | 0:d6e186427f3e | 286 | void getTOUCH (char *, int, int *,int *); |
AdamGreen | 0:d6e186427f3e | 287 | int getSTATUS (char *, int); |
AdamGreen | 0:d6e186427f3e | 288 | void version (void); |
AdamGreen | 0:d6e186427f3e | 289 | #if DEBUGMODE |
AdamGreen | 0:d6e186427f3e | 290 | Serial pc; |
AdamGreen | 0:d6e186427f3e | 291 | #endif // DEBUGMODE |
AdamGreen | 0:d6e186427f3e | 292 | }; |
AdamGreen | 0:d6e186427f3e | 293 | |
AdamGreen | 0:d6e186427f3e | 294 | typedef unsigned char BYTE; |