![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Game codes for Pokemon Academy Yiu Fai Kwok - 201198802 I have read the University Regulations on Plagiarism and state that the work covered by this declaration is my own and does not contain any unacknowledged work from other sources.
Dependencies: mbed FXOS8700CQ mbed-rtos
N5110/N5110.h@0:1da4db5de653, 2019-03-11 (annotated)
- Committer:
- yfkwok
- Date:
- Mon Mar 11 19:48:14 2019 +0000
- Revision:
- 0:1da4db5de653
initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
yfkwok | 0:1da4db5de653 | 1 | #ifndef N5110_H |
yfkwok | 0:1da4db5de653 | 2 | #define N5110_H |
yfkwok | 0:1da4db5de653 | 3 | |
yfkwok | 0:1da4db5de653 | 4 | #include "mbed.h" |
yfkwok | 0:1da4db5de653 | 5 | |
yfkwok | 0:1da4db5de653 | 6 | // number of pixels on display |
yfkwok | 0:1da4db5de653 | 7 | #define WIDTH 84 |
yfkwok | 0:1da4db5de653 | 8 | #define HEIGHT 48 |
yfkwok | 0:1da4db5de653 | 9 | #define BANKS 6 |
yfkwok | 0:1da4db5de653 | 10 | |
yfkwok | 0:1da4db5de653 | 11 | /// Fill types for 2D shapes |
yfkwok | 0:1da4db5de653 | 12 | enum FillType { |
yfkwok | 0:1da4db5de653 | 13 | FILL_TRANSPARENT, ///< Transparent with outline |
yfkwok | 0:1da4db5de653 | 14 | FILL_BLACK, ///< Filled black |
yfkwok | 0:1da4db5de653 | 15 | FILL_WHITE, ///< Filled white (no outline) |
yfkwok | 0:1da4db5de653 | 16 | }; |
yfkwok | 0:1da4db5de653 | 17 | |
yfkwok | 0:1da4db5de653 | 18 | /** N5110 Class |
yfkwok | 0:1da4db5de653 | 19 | @brief Library for interfacing with Nokia 5110 LCD display (https://www.sparkfun.com/products/10168) using the hardware SPI on the mbed. |
yfkwok | 0:1da4db5de653 | 20 | @brief The display is powered from a GPIO pin meaning it can be controlled via software. The LED backlight is also software-controllable (via PWM pin). |
yfkwok | 0:1da4db5de653 | 21 | @brief Can print characters and strings to the display using the included 5x7 font. |
yfkwok | 0:1da4db5de653 | 22 | @brief The library also implements a screen buffer so that individual pixels on the display (84 x 48) can be set, cleared and read. |
yfkwok | 0:1da4db5de653 | 23 | @brief The library can print primitive shapes (lines, circles, rectangles) |
yfkwok | 0:1da4db5de653 | 24 | @brief Acknowledgements to Chris Yan's Nokia_5110 Library. |
yfkwok | 0:1da4db5de653 | 25 | |
yfkwok | 0:1da4db5de653 | 26 | @brief Revision 1.3 |
yfkwok | 0:1da4db5de653 | 27 | |
yfkwok | 0:1da4db5de653 | 28 | @author Craig A. Evans |
yfkwok | 0:1da4db5de653 | 29 | @date 7th February 2017 |
yfkwok | 0:1da4db5de653 | 30 | |
yfkwok | 0:1da4db5de653 | 31 | @code |
yfkwok | 0:1da4db5de653 | 32 | |
yfkwok | 0:1da4db5de653 | 33 | #include "mbed.h" |
yfkwok | 0:1da4db5de653 | 34 | #include "N5110.h" |
yfkwok | 0:1da4db5de653 | 35 | |
yfkwok | 0:1da4db5de653 | 36 | // rows,cols |
yfkwok | 0:1da4db5de653 | 37 | int sprite[8][5] = { |
yfkwok | 0:1da4db5de653 | 38 | { 0,0,1,0,0 }, |
yfkwok | 0:1da4db5de653 | 39 | { 0,1,1,1,0 }, |
yfkwok | 0:1da4db5de653 | 40 | { 0,0,1,0,0 }, |
yfkwok | 0:1da4db5de653 | 41 | { 0,1,1,1,0 }, |
yfkwok | 0:1da4db5de653 | 42 | { 1,1,1,1,1 }, |
yfkwok | 0:1da4db5de653 | 43 | { 1,1,1,1,1 }, |
yfkwok | 0:1da4db5de653 | 44 | { 1,1,0,1,1 }, |
yfkwok | 0:1da4db5de653 | 45 | { 1,1,0,1,1 }, |
yfkwok | 0:1da4db5de653 | 46 | }; |
yfkwok | 0:1da4db5de653 | 47 | |
yfkwok | 0:1da4db5de653 | 48 | // VCC,SCE,RST,D/C,MOSI,SCLK,LED |
yfkwok | 0:1da4db5de653 | 49 | //N5110 lcd(p7,p8,p9,p10,p11,p13,p21); // LPC1768 - pwr from GPIO |
yfkwok | 0:1da4db5de653 | 50 | N5110 lcd(p8,p9,p10,p11,p13,p21); // LPC1768 - powered from +3V3 - JP1 in 2/3 position |
yfkwok | 0:1da4db5de653 | 51 | //N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11); // K64F - pwr from 3V3 |
yfkwok | 0:1da4db5de653 | 52 | |
yfkwok | 0:1da4db5de653 | 53 | int main() |
yfkwok | 0:1da4db5de653 | 54 | { |
yfkwok | 0:1da4db5de653 | 55 | // first need to initialise display |
yfkwok | 0:1da4db5de653 | 56 | lcd.init(); |
yfkwok | 0:1da4db5de653 | 57 | |
yfkwok | 0:1da4db5de653 | 58 | // change set contrast in range 0.0 to 1.0 |
yfkwok | 0:1da4db5de653 | 59 | // 0.4 appears to be a good starting point |
yfkwok | 0:1da4db5de653 | 60 | lcd.setContrast(0.4); |
yfkwok | 0:1da4db5de653 | 61 | |
yfkwok | 0:1da4db5de653 | 62 | while(1) { |
yfkwok | 0:1da4db5de653 | 63 | |
yfkwok | 0:1da4db5de653 | 64 | // these are default settings so not strictly needed |
yfkwok | 0:1da4db5de653 | 65 | lcd.normalMode(); // normal colour mode |
yfkwok | 0:1da4db5de653 | 66 | lcd.setBrightness(0.5); // put LED backlight on 50% |
yfkwok | 0:1da4db5de653 | 67 | |
yfkwok | 0:1da4db5de653 | 68 | lcd.clear(); |
yfkwok | 0:1da4db5de653 | 69 | // x origin, y origin, rows, cols, sprite |
yfkwok | 0:1da4db5de653 | 70 | lcd.drawSprite(20,6,8,5,(int *)sprite); |
yfkwok | 0:1da4db5de653 | 71 | lcd.refresh(); |
yfkwok | 0:1da4db5de653 | 72 | wait(5.0); |
yfkwok | 0:1da4db5de653 | 73 | |
yfkwok | 0:1da4db5de653 | 74 | lcd.clear(); // clear buffer at start of every loop |
yfkwok | 0:1da4db5de653 | 75 | // can directly print strings at specified co-ordinates (must be less than 84 pixels to fit on display) |
yfkwok | 0:1da4db5de653 | 76 | lcd.printString("Hello, World!",0,0); |
yfkwok | 0:1da4db5de653 | 77 | |
yfkwok | 0:1da4db5de653 | 78 | char buffer[14]; // each character is 6 pixels wide, screen is 84 pixels (84/6 = 14) |
yfkwok | 0:1da4db5de653 | 79 | // so can display a string of a maximum 14 characters in length |
yfkwok | 0:1da4db5de653 | 80 | // or create formatted strings - ensure they aren't more than 14 characters long |
yfkwok | 0:1da4db5de653 | 81 | int temperature = 27; |
yfkwok | 0:1da4db5de653 | 82 | int length = sprintf(buffer,"T = %2d C",temperature); // print formatted data to buffer |
yfkwok | 0:1da4db5de653 | 83 | // it is important the format specifier ensures the length will fit in the buffer |
yfkwok | 0:1da4db5de653 | 84 | if (length <= 14) // if string will fit on display (assuming printing at x=0) |
yfkwok | 0:1da4db5de653 | 85 | lcd.printString(buffer,0,1); // display on screen |
yfkwok | 0:1da4db5de653 | 86 | |
yfkwok | 0:1da4db5de653 | 87 | float pressure = 1012.3; // same idea with floats |
yfkwok | 0:1da4db5de653 | 88 | length = sprintf(buffer,"P = %.2f mb",pressure); |
yfkwok | 0:1da4db5de653 | 89 | if (length <= 14) |
yfkwok | 0:1da4db5de653 | 90 | lcd.printString(buffer,0,2); |
yfkwok | 0:1da4db5de653 | 91 | |
yfkwok | 0:1da4db5de653 | 92 | // can also print individual characters at specified place |
yfkwok | 0:1da4db5de653 | 93 | lcd.printChar('X',5,3); |
yfkwok | 0:1da4db5de653 | 94 | |
yfkwok | 0:1da4db5de653 | 95 | // draw a line across the display at y = 40 pixels (origin top-left) |
yfkwok | 0:1da4db5de653 | 96 | for (int i = 0; i < WIDTH; i++) { |
yfkwok | 0:1da4db5de653 | 97 | lcd.setPixel(i,40,true); |
yfkwok | 0:1da4db5de653 | 98 | } |
yfkwok | 0:1da4db5de653 | 99 | // need to refresh display after setting pixels or writing strings |
yfkwok | 0:1da4db5de653 | 100 | lcd.refresh(); |
yfkwok | 0:1da4db5de653 | 101 | wait(5.0); |
yfkwok | 0:1da4db5de653 | 102 | |
yfkwok | 0:1da4db5de653 | 103 | // can check status of pixel using getPixel(x,y); |
yfkwok | 0:1da4db5de653 | 104 | lcd.clear(); // clear buffer |
yfkwok | 0:1da4db5de653 | 105 | lcd.setPixel(2,2,true); // set random pixel in buffer |
yfkwok | 0:1da4db5de653 | 106 | lcd.refresh(); |
yfkwok | 0:1da4db5de653 | 107 | wait(1.0); |
yfkwok | 0:1da4db5de653 | 108 | |
yfkwok | 0:1da4db5de653 | 109 | int pixel_to_test = lcd.getPixel(2,2); |
yfkwok | 0:1da4db5de653 | 110 | |
yfkwok | 0:1da4db5de653 | 111 | if ( pixel_to_test ) { |
yfkwok | 0:1da4db5de653 | 112 | lcd.printString("2,2 is set",0,4); |
yfkwok | 0:1da4db5de653 | 113 | } |
yfkwok | 0:1da4db5de653 | 114 | |
yfkwok | 0:1da4db5de653 | 115 | // this one shouldn't be set |
yfkwok | 0:1da4db5de653 | 116 | lcd.setPixel(3,3,false); // clear random pixel in buffer |
yfkwok | 0:1da4db5de653 | 117 | lcd.refresh(); |
yfkwok | 0:1da4db5de653 | 118 | pixel_to_test = lcd.getPixel(3,3); |
yfkwok | 0:1da4db5de653 | 119 | |
yfkwok | 0:1da4db5de653 | 120 | if ( pixel_to_test == 0 ) { |
yfkwok | 0:1da4db5de653 | 121 | lcd.printString("3,3 is clear",0,5); |
yfkwok | 0:1da4db5de653 | 122 | } |
yfkwok | 0:1da4db5de653 | 123 | |
yfkwok | 0:1da4db5de653 | 124 | lcd.refresh(); |
yfkwok | 0:1da4db5de653 | 125 | wait(4.0); |
yfkwok | 0:1da4db5de653 | 126 | |
yfkwok | 0:1da4db5de653 | 127 | lcd.clear(); // clear buffer |
yfkwok | 0:1da4db5de653 | 128 | lcd.inverseMode(); // invert colours |
yfkwok | 0:1da4db5de653 | 129 | lcd.setBrightness(1.0); // put LED backlight on full |
yfkwok | 0:1da4db5de653 | 130 | |
yfkwok | 0:1da4db5de653 | 131 | float array[84]; |
yfkwok | 0:1da4db5de653 | 132 | |
yfkwok | 0:1da4db5de653 | 133 | for (int i = 0; i < 84; i++) { |
yfkwok | 0:1da4db5de653 | 134 | array[i] = 0.5 + 0.5*sin(i*2*3.14/84); |
yfkwok | 0:1da4db5de653 | 135 | } |
yfkwok | 0:1da4db5de653 | 136 | |
yfkwok | 0:1da4db5de653 | 137 | // can also plot graphs - 84 elements only |
yfkwok | 0:1da4db5de653 | 138 | // values must be in range 0.0 - 1.0 |
yfkwok | 0:1da4db5de653 | 139 | lcd.plotArray(array); |
yfkwok | 0:1da4db5de653 | 140 | lcd.refresh(); |
yfkwok | 0:1da4db5de653 | 141 | wait(5.0); |
yfkwok | 0:1da4db5de653 | 142 | |
yfkwok | 0:1da4db5de653 | 143 | lcd.clear(); |
yfkwok | 0:1da4db5de653 | 144 | lcd.normalMode(); // normal colour mode back |
yfkwok | 0:1da4db5de653 | 145 | lcd.setBrightness(0.5); // put LED backlight on 50% |
yfkwok | 0:1da4db5de653 | 146 | |
yfkwok | 0:1da4db5de653 | 147 | // example of drawing lines |
yfkwok | 0:1da4db5de653 | 148 | for (int x = 0; x < WIDTH ; x+=10) { |
yfkwok | 0:1da4db5de653 | 149 | // x0,y0,x1,y1,type 0-white,1-black,2-dotted |
yfkwok | 0:1da4db5de653 | 150 | lcd.drawLine(0,0,x,HEIGHT,2); |
yfkwok | 0:1da4db5de653 | 151 | } |
yfkwok | 0:1da4db5de653 | 152 | lcd.refresh(); // refresh after drawing shapes |
yfkwok | 0:1da4db5de653 | 153 | wait(5.0); |
yfkwok | 0:1da4db5de653 | 154 | |
yfkwok | 0:1da4db5de653 | 155 | |
yfkwok | 0:1da4db5de653 | 156 | lcd.clear(); |
yfkwok | 0:1da4db5de653 | 157 | // example of how to draw circles |
yfkwok | 0:1da4db5de653 | 158 | lcd.drawCircle(WIDTH/2,HEIGHT/2,20,FILL_BLACK); // x,y,radius,black fill |
yfkwok | 0:1da4db5de653 | 159 | lcd.drawCircle(WIDTH/2,HEIGHT/2,10,FILL_WHITE); // x,y,radius,white fill |
yfkwok | 0:1da4db5de653 | 160 | lcd.drawCircle(WIDTH/2,HEIGHT/2,30,FILL_TRANSPARENT); // x,y,radius,transparent with outline |
yfkwok | 0:1da4db5de653 | 161 | lcd.refresh(); // refresh after drawing shapes |
yfkwok | 0:1da4db5de653 | 162 | wait(5.0); |
yfkwok | 0:1da4db5de653 | 163 | |
yfkwok | 0:1da4db5de653 | 164 | lcd.clear(); |
yfkwok | 0:1da4db5de653 | 165 | // example of how to draw rectangles |
yfkwok | 0:1da4db5de653 | 166 | // origin x,y,width,height,type |
yfkwok | 0:1da4db5de653 | 167 | lcd.drawRect(10,10,50,30,FILL_BLACK); // filled black rectangle |
yfkwok | 0:1da4db5de653 | 168 | lcd.drawRect(15,15,20,10,FILL_WHITE); // filled white rectange (no outline) |
yfkwok | 0:1da4db5de653 | 169 | lcd.drawRect(2,2,70,40,FILL_TRANSPARENT); // transparent, just outline |
yfkwok | 0:1da4db5de653 | 170 | lcd.refresh(); // refresh after drawing shapes |
yfkwok | 0:1da4db5de653 | 171 | wait(5.0); |
yfkwok | 0:1da4db5de653 | 172 | |
yfkwok | 0:1da4db5de653 | 173 | } |
yfkwok | 0:1da4db5de653 | 174 | } |
yfkwok | 0:1da4db5de653 | 175 | |
yfkwok | 0:1da4db5de653 | 176 | |
yfkwok | 0:1da4db5de653 | 177 | @endcode |
yfkwok | 0:1da4db5de653 | 178 | */ |
yfkwok | 0:1da4db5de653 | 179 | class N5110 |
yfkwok | 0:1da4db5de653 | 180 | { |
yfkwok | 0:1da4db5de653 | 181 | private: |
yfkwok | 0:1da4db5de653 | 182 | // objects |
yfkwok | 0:1da4db5de653 | 183 | SPI *_spi; |
yfkwok | 0:1da4db5de653 | 184 | PwmOut *_led; |
yfkwok | 0:1da4db5de653 | 185 | DigitalOut *_pwr; |
yfkwok | 0:1da4db5de653 | 186 | DigitalOut *_sce; |
yfkwok | 0:1da4db5de653 | 187 | DigitalOut *_rst; |
yfkwok | 0:1da4db5de653 | 188 | DigitalOut *_dc; |
yfkwok | 0:1da4db5de653 | 189 | |
yfkwok | 0:1da4db5de653 | 190 | // variables |
yfkwok | 0:1da4db5de653 | 191 | unsigned char buffer[84][6]; // screen buffer - the 6 is for the banks - each one is 8 bits; |
yfkwok | 0:1da4db5de653 | 192 | |
yfkwok | 0:1da4db5de653 | 193 | public: |
yfkwok | 0:1da4db5de653 | 194 | /** Create a N5110 object connected to the specified pins |
yfkwok | 0:1da4db5de653 | 195 | * |
yfkwok | 0:1da4db5de653 | 196 | * @param pwr Pin connected to Vcc on the LCD display (pin 1) |
yfkwok | 0:1da4db5de653 | 197 | * @param sce Pin connected to chip enable (pin 3) |
yfkwok | 0:1da4db5de653 | 198 | * @param rst Pin connected to reset (pin 4) |
yfkwok | 0:1da4db5de653 | 199 | * @param dc Pin connected to data/command select (pin 5) |
yfkwok | 0:1da4db5de653 | 200 | * @param mosi Pin connected to data input (MOSI) (pin 6) |
yfkwok | 0:1da4db5de653 | 201 | * @param sclk Pin connected to serial clock (SCLK) (pin 7) |
yfkwok | 0:1da4db5de653 | 202 | * @param led Pin connected to LED backlight (must be PWM) (pin 8) |
yfkwok | 0:1da4db5de653 | 203 | * |
yfkwok | 0:1da4db5de653 | 204 | */ |
yfkwok | 0:1da4db5de653 | 205 | N5110(PinName const pwrPin, |
yfkwok | 0:1da4db5de653 | 206 | PinName const scePin, |
yfkwok | 0:1da4db5de653 | 207 | PinName const rstPin, |
yfkwok | 0:1da4db5de653 | 208 | PinName const dcPin, |
yfkwok | 0:1da4db5de653 | 209 | PinName const mosiPin, |
yfkwok | 0:1da4db5de653 | 210 | PinName const sclkPin, |
yfkwok | 0:1da4db5de653 | 211 | PinName const ledPin); |
yfkwok | 0:1da4db5de653 | 212 | |
yfkwok | 0:1da4db5de653 | 213 | /** Create a N5110 object connected to the specified pins (Vcc to +3V3) |
yfkwok | 0:1da4db5de653 | 214 | * |
yfkwok | 0:1da4db5de653 | 215 | * @param sce Pin connected to chip enable (pin 3) |
yfkwok | 0:1da4db5de653 | 216 | * @param rst Pin connected to reset (pin 4) |
yfkwok | 0:1da4db5de653 | 217 | * @param dc Pin connected to data/command select (pin 5) |
yfkwok | 0:1da4db5de653 | 218 | * @param mosi Pin connected to data input (MOSI) (pin 6) |
yfkwok | 0:1da4db5de653 | 219 | * @param sclk Pin connected to serial clock (SCLK) (pin 7) |
yfkwok | 0:1da4db5de653 | 220 | * @param led Pin connected to LED backlight (must be PWM) (pin 8) |
yfkwok | 0:1da4db5de653 | 221 | * |
yfkwok | 0:1da4db5de653 | 222 | */ |
yfkwok | 0:1da4db5de653 | 223 | N5110(PinName const scePin, |
yfkwok | 0:1da4db5de653 | 224 | PinName const rstPin, |
yfkwok | 0:1da4db5de653 | 225 | PinName const dcPin, |
yfkwok | 0:1da4db5de653 | 226 | PinName const mosiPin, |
yfkwok | 0:1da4db5de653 | 227 | PinName const sclkPin, |
yfkwok | 0:1da4db5de653 | 228 | PinName const ledPin); |
yfkwok | 0:1da4db5de653 | 229 | |
yfkwok | 0:1da4db5de653 | 230 | /** |
yfkwok | 0:1da4db5de653 | 231 | * Free allocated memory when object goes out of scope |
yfkwok | 0:1da4db5de653 | 232 | */ |
yfkwok | 0:1da4db5de653 | 233 | ~N5110(); |
yfkwok | 0:1da4db5de653 | 234 | |
yfkwok | 0:1da4db5de653 | 235 | /** Initialise display |
yfkwok | 0:1da4db5de653 | 236 | * |
yfkwok | 0:1da4db5de653 | 237 | * Powers up the display and turns on backlight (50% brightness default). |
yfkwok | 0:1da4db5de653 | 238 | * Sets the display up in horizontal addressing mode and with normal video mode. |
yfkwok | 0:1da4db5de653 | 239 | */ |
yfkwok | 0:1da4db5de653 | 240 | void init(); |
yfkwok | 0:1da4db5de653 | 241 | |
yfkwok | 0:1da4db5de653 | 242 | /** Turn off |
yfkwok | 0:1da4db5de653 | 243 | * |
yfkwok | 0:1da4db5de653 | 244 | * Powers down the display and turns of the backlight. |
yfkwok | 0:1da4db5de653 | 245 | * Needs to be reinitialised before being re-used. |
yfkwok | 0:1da4db5de653 | 246 | */ |
yfkwok | 0:1da4db5de653 | 247 | void turnOff(); |
yfkwok | 0:1da4db5de653 | 248 | |
yfkwok | 0:1da4db5de653 | 249 | /** Clear |
yfkwok | 0:1da4db5de653 | 250 | * |
yfkwok | 0:1da4db5de653 | 251 | * Clears the screen buffer. |
yfkwok | 0:1da4db5de653 | 252 | */ |
yfkwok | 0:1da4db5de653 | 253 | void clear(); |
yfkwok | 0:1da4db5de653 | 254 | |
yfkwok | 0:1da4db5de653 | 255 | /** Set screen constrast |
yfkwok | 0:1da4db5de653 | 256 | * @param constrast - float in range 0.0 to 1.0 (0.40 to 0.60 is usually a good value) |
yfkwok | 0:1da4db5de653 | 257 | */ |
yfkwok | 0:1da4db5de653 | 258 | void setContrast(float contrast); |
yfkwok | 0:1da4db5de653 | 259 | |
yfkwok | 0:1da4db5de653 | 260 | /** Turn on normal video mode (default) |
yfkwok | 0:1da4db5de653 | 261 | * Black on white |
yfkwok | 0:1da4db5de653 | 262 | */ |
yfkwok | 0:1da4db5de653 | 263 | void normalMode(); |
yfkwok | 0:1da4db5de653 | 264 | |
yfkwok | 0:1da4db5de653 | 265 | /** Turn on inverse video mode (default) |
yfkwok | 0:1da4db5de653 | 266 | * White on black |
yfkwok | 0:1da4db5de653 | 267 | */ |
yfkwok | 0:1da4db5de653 | 268 | void inverseMode(); |
yfkwok | 0:1da4db5de653 | 269 | |
yfkwok | 0:1da4db5de653 | 270 | /** Set Brightness |
yfkwok | 0:1da4db5de653 | 271 | * |
yfkwok | 0:1da4db5de653 | 272 | * Sets brightness of LED backlight. |
yfkwok | 0:1da4db5de653 | 273 | * @param brightness - float in range 0.0 to 1.0 |
yfkwok | 0:1da4db5de653 | 274 | */ |
yfkwok | 0:1da4db5de653 | 275 | void setBrightness(float const brightness); |
yfkwok | 0:1da4db5de653 | 276 | |
yfkwok | 0:1da4db5de653 | 277 | /** Print String |
yfkwok | 0:1da4db5de653 | 278 | * |
yfkwok | 0:1da4db5de653 | 279 | * Prints a string of characters to the screen buffer. String is cut-off after the 83rd pixel. |
yfkwok | 0:1da4db5de653 | 280 | * @param x - the column number (0 to 83) |
yfkwok | 0:1da4db5de653 | 281 | * @param y - the row number (0 to 5) - the display is split into 6 banks - each bank can be considered a row |
yfkwok | 0:1da4db5de653 | 282 | */ |
yfkwok | 0:1da4db5de653 | 283 | void printString(char const *str, |
yfkwok | 0:1da4db5de653 | 284 | unsigned int const x, |
yfkwok | 0:1da4db5de653 | 285 | unsigned int const y); |
yfkwok | 0:1da4db5de653 | 286 | |
yfkwok | 0:1da4db5de653 | 287 | /** Print Character |
yfkwok | 0:1da4db5de653 | 288 | * |
yfkwok | 0:1da4db5de653 | 289 | * Sends a character to the screen buffer. Printed at the specified location. Character is cut-off after the 83rd pixel. |
yfkwok | 0:1da4db5de653 | 290 | * @param c - the character to print. Can print ASCII as so printChar('C'). |
yfkwok | 0:1da4db5de653 | 291 | * @param x - the column number (0 to 83) |
yfkwok | 0:1da4db5de653 | 292 | * @param y - the row number (0 to 5) - the display is split into 6 banks - each bank can be considered a row |
yfkwok | 0:1da4db5de653 | 293 | */ |
yfkwok | 0:1da4db5de653 | 294 | void printChar(char const c, |
yfkwok | 0:1da4db5de653 | 295 | unsigned int const x, |
yfkwok | 0:1da4db5de653 | 296 | unsigned int const y); |
yfkwok | 0:1da4db5de653 | 297 | |
yfkwok | 0:1da4db5de653 | 298 | /** |
yfkwok | 0:1da4db5de653 | 299 | * @brief Set a Pixel |
yfkwok | 0:1da4db5de653 | 300 | * |
yfkwok | 0:1da4db5de653 | 301 | * @param x The x co-ordinate of the pixel (0 to 83) |
yfkwok | 0:1da4db5de653 | 302 | * @param y The y co-ordinate of the pixel (0 to 47) |
yfkwok | 0:1da4db5de653 | 303 | * @param state The state of the pixel [true=black (default), false=white] |
yfkwok | 0:1da4db5de653 | 304 | * |
yfkwok | 0:1da4db5de653 | 305 | * @details This function sets the state of a pixel in the screen buffer. |
yfkwok | 0:1da4db5de653 | 306 | * The third parameter can be omitted, |
yfkwok | 0:1da4db5de653 | 307 | */ |
yfkwok | 0:1da4db5de653 | 308 | void setPixel(unsigned int const x, |
yfkwok | 0:1da4db5de653 | 309 | unsigned int const y, |
yfkwok | 0:1da4db5de653 | 310 | bool const state = true); |
yfkwok | 0:1da4db5de653 | 311 | |
yfkwok | 0:1da4db5de653 | 312 | /** |
yfkwok | 0:1da4db5de653 | 313 | * @brief Clear a Pixel |
yfkwok | 0:1da4db5de653 | 314 | * |
yfkwok | 0:1da4db5de653 | 315 | * @param x - the x co-ordinate of the pixel (0 to 83) |
yfkwok | 0:1da4db5de653 | 316 | * @param y - the y co-ordinate of the pixel (0 to 47) |
yfkwok | 0:1da4db5de653 | 317 | * |
yfkwok | 0:1da4db5de653 | 318 | * @details This function clears pixel in the screen buffer |
yfkwok | 0:1da4db5de653 | 319 | * |
yfkwok | 0:1da4db5de653 | 320 | * @deprecated Use setPixel(x, y, false) instead |
yfkwok | 0:1da4db5de653 | 321 | */ |
yfkwok | 0:1da4db5de653 | 322 | void clearPixel(unsigned int const x, |
yfkwok | 0:1da4db5de653 | 323 | unsigned int const y) |
yfkwok | 0:1da4db5de653 | 324 | __attribute__((deprecated("Use setPixel(x,y,false) instead"))); |
yfkwok | 0:1da4db5de653 | 325 | |
yfkwok | 0:1da4db5de653 | 326 | /** Get a Pixel |
yfkwok | 0:1da4db5de653 | 327 | * |
yfkwok | 0:1da4db5de653 | 328 | * This function gets the status of a pixel in the screen buffer. |
yfkwok | 0:1da4db5de653 | 329 | * @param x - the x co-ordinate of the pixel (0 to 83) |
yfkwok | 0:1da4db5de653 | 330 | * @param y - the y co-ordinate of the pixel (0 to 47) |
yfkwok | 0:1da4db5de653 | 331 | * @returns |
yfkwok | 0:1da4db5de653 | 332 | * 0 - pixel is clear |
yfkwok | 0:1da4db5de653 | 333 | * 1 - pixel is set |
yfkwok | 0:1da4db5de653 | 334 | */ |
yfkwok | 0:1da4db5de653 | 335 | int getPixel(unsigned int const x, |
yfkwok | 0:1da4db5de653 | 336 | unsigned int const y) const; |
yfkwok | 0:1da4db5de653 | 337 | |
yfkwok | 0:1da4db5de653 | 338 | /** Refresh display |
yfkwok | 0:1da4db5de653 | 339 | * |
yfkwok | 0:1da4db5de653 | 340 | * This functions sends the screen buffer to the display. |
yfkwok | 0:1da4db5de653 | 341 | */ |
yfkwok | 0:1da4db5de653 | 342 | void refresh(); |
yfkwok | 0:1da4db5de653 | 343 | |
yfkwok | 0:1da4db5de653 | 344 | /** Randomise buffer |
yfkwok | 0:1da4db5de653 | 345 | * |
yfkwok | 0:1da4db5de653 | 346 | * This function fills the buffer with random data. Can be used to test the display. |
yfkwok | 0:1da4db5de653 | 347 | * A call to refresh() must be made to update the display to reflect the change in pixels. |
yfkwok | 0:1da4db5de653 | 348 | * The seed is not set and so the generated pattern will probably be the same each time. |
yfkwok | 0:1da4db5de653 | 349 | * TODO: Randomise the seed - maybe using the noise on the AnalogIn pins. |
yfkwok | 0:1da4db5de653 | 350 | */ |
yfkwok | 0:1da4db5de653 | 351 | void randomiseBuffer(); |
yfkwok | 0:1da4db5de653 | 352 | |
yfkwok | 0:1da4db5de653 | 353 | /** Plot Array |
yfkwok | 0:1da4db5de653 | 354 | * |
yfkwok | 0:1da4db5de653 | 355 | * This function plots a one-dimensional array in the buffer. |
yfkwok | 0:1da4db5de653 | 356 | * @param array[] - y values of the plot. Values should be normalised in the range 0.0 to 1.0. First 84 plotted. |
yfkwok | 0:1da4db5de653 | 357 | */ |
yfkwok | 0:1da4db5de653 | 358 | void plotArray(float const array[]); |
yfkwok | 0:1da4db5de653 | 359 | |
yfkwok | 0:1da4db5de653 | 360 | /** Draw Circle |
yfkwok | 0:1da4db5de653 | 361 | * |
yfkwok | 0:1da4db5de653 | 362 | * This function draws a circle at the specified origin with specified radius in the screen buffer |
yfkwok | 0:1da4db5de653 | 363 | * Uses the midpoint circle algorithm. |
yfkwok | 0:1da4db5de653 | 364 | * @see http://en.wikipedia.org/wiki/Midpoint_circle_algorithm |
yfkwok | 0:1da4db5de653 | 365 | * @param x0 - x-coordinate of centre |
yfkwok | 0:1da4db5de653 | 366 | * @param y0 - y-coordinate of centre |
yfkwok | 0:1da4db5de653 | 367 | * @param radius - radius of circle in pixels |
yfkwok | 0:1da4db5de653 | 368 | * @param fill - fill-type for the shape |
yfkwok | 0:1da4db5de653 | 369 | */ |
yfkwok | 0:1da4db5de653 | 370 | void drawCircle(unsigned int const x0, |
yfkwok | 0:1da4db5de653 | 371 | unsigned int const y0, |
yfkwok | 0:1da4db5de653 | 372 | unsigned int const radius, |
yfkwok | 0:1da4db5de653 | 373 | FillType const fill); |
yfkwok | 0:1da4db5de653 | 374 | |
yfkwok | 0:1da4db5de653 | 375 | /** Draw Line |
yfkwok | 0:1da4db5de653 | 376 | * |
yfkwok | 0:1da4db5de653 | 377 | * This function draws a line between the specified points using linear interpolation. |
yfkwok | 0:1da4db5de653 | 378 | * @param x0 - x-coordinate of first point |
yfkwok | 0:1da4db5de653 | 379 | * @param y0 - y-coordinate of first point |
yfkwok | 0:1da4db5de653 | 380 | * @param x1 - x-coordinate of last point |
yfkwok | 0:1da4db5de653 | 381 | * @param y1 - y-coordinate of last point |
yfkwok | 0:1da4db5de653 | 382 | * @param type - 0 white,1 black,2 dotted |
yfkwok | 0:1da4db5de653 | 383 | */ |
yfkwok | 0:1da4db5de653 | 384 | void drawLine(unsigned int const x0, |
yfkwok | 0:1da4db5de653 | 385 | unsigned int const y0, |
yfkwok | 0:1da4db5de653 | 386 | unsigned int const x1, |
yfkwok | 0:1da4db5de653 | 387 | unsigned int const y1, |
yfkwok | 0:1da4db5de653 | 388 | unsigned int const type); |
yfkwok | 0:1da4db5de653 | 389 | |
yfkwok | 0:1da4db5de653 | 390 | /** Draw Rectangle |
yfkwok | 0:1da4db5de653 | 391 | * |
yfkwok | 0:1da4db5de653 | 392 | * This function draws a rectangle. |
yfkwok | 0:1da4db5de653 | 393 | * @param x0 - x-coordinate of origin (top-left) |
yfkwok | 0:1da4db5de653 | 394 | * @param y0 - y-coordinate of origin (top-left) |
yfkwok | 0:1da4db5de653 | 395 | * @param width - width of rectangle |
yfkwok | 0:1da4db5de653 | 396 | * @param height - height of rectangle |
yfkwok | 0:1da4db5de653 | 397 | * @param fill - fill-type for the shape |
yfkwok | 0:1da4db5de653 | 398 | */ |
yfkwok | 0:1da4db5de653 | 399 | void drawRect(unsigned int const x0, |
yfkwok | 0:1da4db5de653 | 400 | unsigned int const y0, |
yfkwok | 0:1da4db5de653 | 401 | unsigned int const width, |
yfkwok | 0:1da4db5de653 | 402 | unsigned int const height, |
yfkwok | 0:1da4db5de653 | 403 | FillType const fill); |
yfkwok | 0:1da4db5de653 | 404 | |
yfkwok | 0:1da4db5de653 | 405 | /** Draw Sprite |
yfkwok | 0:1da4db5de653 | 406 | * |
yfkwok | 0:1da4db5de653 | 407 | * This function draws a sprite as defined in a 2D array |
yfkwok | 0:1da4db5de653 | 408 | * @param x0 - x-coordinate of origin (top-left) |
yfkwok | 0:1da4db5de653 | 409 | * @param y0 - y-coordinate of origin (top-left) |
yfkwok | 0:1da4db5de653 | 410 | * @param nrows - number of rows in sprite |
yfkwok | 0:1da4db5de653 | 411 | * @param ncols - number of columns in sprite |
yfkwok | 0:1da4db5de653 | 412 | * @param sprite - 2D array representing the sprite |
yfkwok | 0:1da4db5de653 | 413 | */ |
yfkwok | 0:1da4db5de653 | 414 | void drawSprite(int x0, |
yfkwok | 0:1da4db5de653 | 415 | int y0, |
yfkwok | 0:1da4db5de653 | 416 | int nrows, |
yfkwok | 0:1da4db5de653 | 417 | int ncols, |
yfkwok | 0:1da4db5de653 | 418 | int *sprite); |
yfkwok | 0:1da4db5de653 | 419 | |
yfkwok | 0:1da4db5de653 | 420 | |
yfkwok | 0:1da4db5de653 | 421 | private: |
yfkwok | 0:1da4db5de653 | 422 | // methods |
yfkwok | 0:1da4db5de653 | 423 | void setXYAddress(unsigned int const x, |
yfkwok | 0:1da4db5de653 | 424 | unsigned int const y); |
yfkwok | 0:1da4db5de653 | 425 | void initSPI(); |
yfkwok | 0:1da4db5de653 | 426 | void turnOn(); |
yfkwok | 0:1da4db5de653 | 427 | void reset(); |
yfkwok | 0:1da4db5de653 | 428 | void clearRAM(); |
yfkwok | 0:1da4db5de653 | 429 | void sendCommand(unsigned char command); |
yfkwok | 0:1da4db5de653 | 430 | void sendData(unsigned char data); |
yfkwok | 0:1da4db5de653 | 431 | void setTempCoefficient(char tc); // 0 to 3 |
yfkwok | 0:1da4db5de653 | 432 | void setBias(char bias); // 0 to 7 |
yfkwok | 0:1da4db5de653 | 433 | }; |
yfkwok | 0:1da4db5de653 | 434 | |
yfkwok | 0:1da4db5de653 | 435 | const unsigned char font5x7[480] = { |
yfkwok | 0:1da4db5de653 | 436 | 0x00, 0x00, 0x00, 0x00, 0x00,// (space) |
yfkwok | 0:1da4db5de653 | 437 | 0x00, 0x00, 0x5F, 0x00, 0x00,// ! |
yfkwok | 0:1da4db5de653 | 438 | 0x00, 0x07, 0x00, 0x07, 0x00,// " |
yfkwok | 0:1da4db5de653 | 439 | 0x14, 0x7F, 0x14, 0x7F, 0x14,// # |
yfkwok | 0:1da4db5de653 | 440 | 0x24, 0x2A, 0x7F, 0x2A, 0x12,// $ |
yfkwok | 0:1da4db5de653 | 441 | 0x23, 0x13, 0x08, 0x64, 0x62,// % |
yfkwok | 0:1da4db5de653 | 442 | 0x36, 0x49, 0x55, 0x22, 0x50,// & |
yfkwok | 0:1da4db5de653 | 443 | 0x00, 0x05, 0x03, 0x00, 0x00,// ' |
yfkwok | 0:1da4db5de653 | 444 | 0x00, 0x1C, 0x22, 0x41, 0x00,// ( |
yfkwok | 0:1da4db5de653 | 445 | 0x00, 0x41, 0x22, 0x1C, 0x00,// ) |
yfkwok | 0:1da4db5de653 | 446 | 0x08, 0x2A, 0x1C, 0x2A, 0x08,// * |
yfkwok | 0:1da4db5de653 | 447 | 0x08, 0x08, 0x3E, 0x08, 0x08,// + |
yfkwok | 0:1da4db5de653 | 448 | 0x00, 0x50, 0x30, 0x00, 0x00,// , |
yfkwok | 0:1da4db5de653 | 449 | 0x08, 0x08, 0x08, 0x08, 0x08,// - |
yfkwok | 0:1da4db5de653 | 450 | 0x00, 0x60, 0x60, 0x00, 0x00,// . |
yfkwok | 0:1da4db5de653 | 451 | 0x20, 0x10, 0x08, 0x04, 0x02,// / |
yfkwok | 0:1da4db5de653 | 452 | 0x3E, 0x51, 0x49, 0x45, 0x3E,// 0 |
yfkwok | 0:1da4db5de653 | 453 | 0x00, 0x42, 0x7F, 0x40, 0x00,// 1 |
yfkwok | 0:1da4db5de653 | 454 | 0x42, 0x61, 0x51, 0x49, 0x46,// 2 |
yfkwok | 0:1da4db5de653 | 455 | 0x21, 0x41, 0x45, 0x4B, 0x31,// 3 |
yfkwok | 0:1da4db5de653 | 456 | 0x18, 0x14, 0x12, 0x7F, 0x10,// 4 |
yfkwok | 0:1da4db5de653 | 457 | 0x27, 0x45, 0x45, 0x45, 0x39,// 5 |
yfkwok | 0:1da4db5de653 | 458 | 0x3C, 0x4A, 0x49, 0x49, 0x30,// 6 |
yfkwok | 0:1da4db5de653 | 459 | 0x01, 0x71, 0x09, 0x05, 0x03,// 7 |
yfkwok | 0:1da4db5de653 | 460 | 0x36, 0x49, 0x49, 0x49, 0x36,// 8 |
yfkwok | 0:1da4db5de653 | 461 | 0x06, 0x49, 0x49, 0x29, 0x1E,// 9 |
yfkwok | 0:1da4db5de653 | 462 | 0x00, 0x36, 0x36, 0x00, 0x00,// : |
yfkwok | 0:1da4db5de653 | 463 | 0x00, 0x56, 0x36, 0x00, 0x00,// ; |
yfkwok | 0:1da4db5de653 | 464 | 0x00, 0x08, 0x14, 0x22, 0x41,// < |
yfkwok | 0:1da4db5de653 | 465 | 0x14, 0x14, 0x14, 0x14, 0x14,// = |
yfkwok | 0:1da4db5de653 | 466 | 0x41, 0x22, 0x14, 0x08, 0x00,// > |
yfkwok | 0:1da4db5de653 | 467 | 0x02, 0x01, 0x51, 0x09, 0x06,// ? |
yfkwok | 0:1da4db5de653 | 468 | 0x32, 0x49, 0x79, 0x41, 0x3E,// @ |
yfkwok | 0:1da4db5de653 | 469 | 0x7E, 0x11, 0x11, 0x11, 0x7E,// A |
yfkwok | 0:1da4db5de653 | 470 | 0x7F, 0x49, 0x49, 0x49, 0x36,// B |
yfkwok | 0:1da4db5de653 | 471 | 0x3E, 0x41, 0x41, 0x41, 0x22,// C |
yfkwok | 0:1da4db5de653 | 472 | 0x7F, 0x41, 0x41, 0x22, 0x1C,// D |
yfkwok | 0:1da4db5de653 | 473 | 0x7F, 0x49, 0x49, 0x49, 0x41,// E |
yfkwok | 0:1da4db5de653 | 474 | 0x7F, 0x09, 0x09, 0x01, 0x01,// F |
yfkwok | 0:1da4db5de653 | 475 | 0x3E, 0x41, 0x41, 0x51, 0x32,// G |
yfkwok | 0:1da4db5de653 | 476 | 0x7F, 0x08, 0x08, 0x08, 0x7F,// H |
yfkwok | 0:1da4db5de653 | 477 | 0x00, 0x41, 0x7F, 0x41, 0x00,// I |
yfkwok | 0:1da4db5de653 | 478 | 0x20, 0x40, 0x41, 0x3F, 0x01,// J |
yfkwok | 0:1da4db5de653 | 479 | 0x7F, 0x08, 0x14, 0x22, 0x41,// K |
yfkwok | 0:1da4db5de653 | 480 | 0x7F, 0x40, 0x40, 0x40, 0x40,// L |
yfkwok | 0:1da4db5de653 | 481 | 0x7F, 0x02, 0x04, 0x02, 0x7F,// M |
yfkwok | 0:1da4db5de653 | 482 | 0x7F, 0x04, 0x08, 0x10, 0x7F,// N |
yfkwok | 0:1da4db5de653 | 483 | 0x3E, 0x41, 0x41, 0x41, 0x3E,// O |
yfkwok | 0:1da4db5de653 | 484 | 0x7F, 0x09, 0x09, 0x09, 0x06,// P |
yfkwok | 0:1da4db5de653 | 485 | 0x3E, 0x41, 0x51, 0x21, 0x5E,// Q |
yfkwok | 0:1da4db5de653 | 486 | 0x7F, 0x09, 0x19, 0x29, 0x46,// R |
yfkwok | 0:1da4db5de653 | 487 | 0x46, 0x49, 0x49, 0x49, 0x31,// S |
yfkwok | 0:1da4db5de653 | 488 | 0x01, 0x01, 0x7F, 0x01, 0x01,// T |
yfkwok | 0:1da4db5de653 | 489 | 0x3F, 0x40, 0x40, 0x40, 0x3F,// U |
yfkwok | 0:1da4db5de653 | 490 | 0x1F, 0x20, 0x40, 0x20, 0x1F,// V |
yfkwok | 0:1da4db5de653 | 491 | 0x7F, 0x20, 0x18, 0x20, 0x7F,// W |
yfkwok | 0:1da4db5de653 | 492 | 0x63, 0x14, 0x08, 0x14, 0x63,// X |
yfkwok | 0:1da4db5de653 | 493 | 0x03, 0x04, 0x78, 0x04, 0x03,// Y |
yfkwok | 0:1da4db5de653 | 494 | 0x61, 0x51, 0x49, 0x45, 0x43,// Z |
yfkwok | 0:1da4db5de653 | 495 | 0x00, 0x00, 0x7F, 0x41, 0x41,// [ |
yfkwok | 0:1da4db5de653 | 496 | 0x02, 0x04, 0x08, 0x10, 0x20,// "\" |
yfkwok | 0:1da4db5de653 | 497 | 0x41, 0x41, 0x7F, 0x00, 0x00,// ] |
yfkwok | 0:1da4db5de653 | 498 | 0x04, 0x02, 0x01, 0x02, 0x04,// ^ |
yfkwok | 0:1da4db5de653 | 499 | 0x40, 0x40, 0x40, 0x40, 0x40,// _ |
yfkwok | 0:1da4db5de653 | 500 | 0x00, 0x01, 0x02, 0x04, 0x00,// ` |
yfkwok | 0:1da4db5de653 | 501 | 0x20, 0x54, 0x54, 0x54, 0x78,// a |
yfkwok | 0:1da4db5de653 | 502 | 0x7F, 0x48, 0x44, 0x44, 0x38,// b |
yfkwok | 0:1da4db5de653 | 503 | 0x38, 0x44, 0x44, 0x44, 0x20,// c |
yfkwok | 0:1da4db5de653 | 504 | 0x38, 0x44, 0x44, 0x48, 0x7F,// d |
yfkwok | 0:1da4db5de653 | 505 | 0x38, 0x54, 0x54, 0x54, 0x18,// e |
yfkwok | 0:1da4db5de653 | 506 | 0x08, 0x7E, 0x09, 0x01, 0x02,// f |
yfkwok | 0:1da4db5de653 | 507 | 0x08, 0x14, 0x54, 0x54, 0x3C,// g |
yfkwok | 0:1da4db5de653 | 508 | 0x7F, 0x08, 0x04, 0x04, 0x78,// h |
yfkwok | 0:1da4db5de653 | 509 | 0x00, 0x44, 0x7D, 0x40, 0x00,// i |
yfkwok | 0:1da4db5de653 | 510 | 0x20, 0x40, 0x44, 0x3D, 0x00,// j |
yfkwok | 0:1da4db5de653 | 511 | 0x00, 0x7F, 0x10, 0x28, 0x44,// k |
yfkwok | 0:1da4db5de653 | 512 | 0x00, 0x41, 0x7F, 0x40, 0x00,// l |
yfkwok | 0:1da4db5de653 | 513 | 0x7C, 0x04, 0x18, 0x04, 0x78,// m |
yfkwok | 0:1da4db5de653 | 514 | 0x7C, 0x08, 0x04, 0x04, 0x78,// n |
yfkwok | 0:1da4db5de653 | 515 | 0x38, 0x44, 0x44, 0x44, 0x38,// o |
yfkwok | 0:1da4db5de653 | 516 | 0x7C, 0x14, 0x14, 0x14, 0x08,// p |
yfkwok | 0:1da4db5de653 | 517 | 0x08, 0x14, 0x14, 0x18, 0x7C,// q |
yfkwok | 0:1da4db5de653 | 518 | 0x7C, 0x08, 0x04, 0x04, 0x08,// r |
yfkwok | 0:1da4db5de653 | 519 | 0x48, 0x54, 0x54, 0x54, 0x20,// s |
yfkwok | 0:1da4db5de653 | 520 | 0x04, 0x3F, 0x44, 0x40, 0x20,// t |
yfkwok | 0:1da4db5de653 | 521 | 0x3C, 0x40, 0x40, 0x20, 0x7C,// u |
yfkwok | 0:1da4db5de653 | 522 | 0x1C, 0x20, 0x40, 0x20, 0x1C,// v |
yfkwok | 0:1da4db5de653 | 523 | 0x3C, 0x40, 0x30, 0x40, 0x3C,// w |
yfkwok | 0:1da4db5de653 | 524 | 0x44, 0x28, 0x10, 0x28, 0x44,// x |
yfkwok | 0:1da4db5de653 | 525 | 0x0C, 0x50, 0x50, 0x50, 0x3C,// y |
yfkwok | 0:1da4db5de653 | 526 | 0x44, 0x64, 0x54, 0x4C, 0x44,// z |
yfkwok | 0:1da4db5de653 | 527 | 0x00, 0x08, 0x36, 0x41, 0x00,// { |
yfkwok | 0:1da4db5de653 | 528 | 0x00, 0x00, 0x7F, 0x00, 0x00,// | |
yfkwok | 0:1da4db5de653 | 529 | 0x00, 0x41, 0x36, 0x08, 0x00,// } |
yfkwok | 0:1da4db5de653 | 530 | 0x08, 0x08, 0x2A, 0x1C, 0x08,// -> |
yfkwok | 0:1da4db5de653 | 531 | 0x08, 0x1C, 0x2A, 0x08, 0x08 // <- |
yfkwok | 0:1da4db5de653 | 532 | }; |
yfkwok | 0:1da4db5de653 | 533 | |
yfkwok | 0:1da4db5de653 | 534 | #endif |