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