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