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