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