Added circle and line support

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers NokiaLCD.cpp Source File

NokiaLCD.cpp

00001 /* mbed Nokia LCD Library
00002  * Copyright (c) 2007-2010, sford
00003  */
00004 
00005 #include "NokiaLCD.h"
00006 
00007 #include "mbed.h"
00008 
00009 #define NOKIALCD_ROWS 16
00010 #define NOKIALCD_COLS 16
00011 #define NOKIALCD_WIDTH 130
00012 #define NOKIALCD_HEIGHT 130
00013 #define NOKIALCD_FREQUENCY 5000000
00014 
00015 NokiaLCD::NokiaLCD(PinName mosi, PinName sclk, PinName cs, PinName rst, LCDType type)
00016         : _spi(mosi, NC, sclk)
00017         , _rst(rst)
00018         , _cs(cs) {
00019 
00020     _type = type;
00021 
00022     _row = 0;
00023     _column = 0;
00024     _foreground = 0x00FFFFFF;
00025     _background = 0x00000000;
00026 
00027     reset();
00028 }
00029 
00030 void NokiaLCD::reset() {
00031 
00032     // setup the SPI interface and bring display out of reset
00033     _cs = 1;
00034     _rst = 0;
00035     _spi.format(9);
00036     _spi.frequency(NOKIALCD_FREQUENCY);
00037     wait_ms(1);
00038     _rst = 1;
00039     wait_ms(1);
00040 
00041     _cs = 0;
00042 
00043     switch (_type) {
00044         case LCD6100:
00045             command(0xCA); // display control
00046             data(0);
00047             data(32);
00048             data(0);
00049             command(0xBB);
00050             data(1);
00051             command(0xD1); // oscillator on
00052             command(0x94); // sleep out
00053             command(0x20); // power control
00054             data(0x0F);
00055             command(0xA7); // invert display
00056             command(0x81); // Voltage control
00057             data(39);      // contrast setting: 0..63
00058             data(3);       // resistance ratio
00059             wait_ms(1);
00060             command(0xBC);
00061             data(0);
00062             data(1);
00063             data(4);
00064             command(0xAF);  // turn on the display
00065             break;
00066             
00067         case LCD6610:
00068             command(0xCA);    // display control
00069             data(0);
00070             data(31);
00071             data(0);
00072             command(0xBB);
00073             data(1);
00074             command(0xD1); // oscillator on
00075             command(0x94); // sleep out
00076             command(0x20); // power control
00077             data(0x0F);
00078             command(0xA7); // invert display
00079             command(0x81); // Voltage control
00080             data(39);      // contrast setting: 0..63
00081             data(3);       // resistance ratio
00082             wait_ms(1);
00083             command(0xBC);
00084             data(0);
00085             data(0);
00086             data(2);
00087             command(0xAF);  // turn on the display
00088             break;
00089             
00090         case PCF8833:
00091             command(0x11);  // sleep out
00092             command(0x3A);  // column mode
00093             data(0x05);
00094             command(0x36);  // madctl
00095             data(0x60);     // vertical RAM, flip x
00096             command(0x25);  // setcon
00097             data(0x30);// contrast 0x30
00098             wait_ms(2);
00099             command(0x29);//DISPON
00100             command(0x03);//BSTRON
00101             break;
00102     }
00103 
00104     _cs = 1;
00105 
00106     cls();
00107 }
00108 
00109 void NokiaLCD::command(int value) {
00110     _spi.write(value & 0xFF);
00111 }
00112 
00113 void NokiaLCD::data(int value) {
00114     _spi.write(value | 0x100);
00115 }
00116 
00117 void NokiaLCD::_window(int x, int y, int width, int height) {
00118     int x1 = x + 2;
00119     int y1 = y + 0;
00120     int x2 = x1 + width - 1;
00121     int y2 = y1 + height - 1;
00122 
00123     switch (_type) {
00124         case LCD6100:
00125         case LCD6610:
00126             command(0x15); // column
00127             data(x1);
00128             data(x2);
00129             command(0x75); // row
00130             data(y1);
00131             data(y2);
00132             command(0x5C); // start write to ram
00133             break;
00134         case PCF8833:
00135             command(0x2A);  // column
00136             data(x1);
00137             data(x2);
00138             command(0x2B); // row
00139             data(y1);
00140             data(y2);
00141             command(0x2C); // start write to ram
00142             break;
00143     }
00144 }
00145 
00146 void NokiaLCD::_putp(int colour) {
00147     int gr = ((colour >> 20) & 0x0F)
00148              | ((colour >> 8 ) & 0xF0);
00149     int nb = ((colour >> 4 ) & 0x0F);
00150     data(nb);
00151     data(gr);
00152 }
00153 
00154 const unsigned char FONT8x8[97][8] = {
00155     0x08,0x08,0x08,0x00,0x00,0x00,0x00,0x00, // columns, rows, num_bytes_per_char
00156     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // space 0x20
00157     0x30,0x78,0x78,0x30,0x30,0x00,0x30,0x00, // !
00158     0x6C,0x6C,0x6C,0x00,0x00,0x00,0x00,0x00, // "
00159     0x6C,0x6C,0xFE,0x6C,0xFE,0x6C,0x6C,0x00, // #
00160     0x18,0x3E,0x60,0x3C,0x06,0x7C,0x18,0x00, // $
00161     0x00,0x63,0x66,0x0C,0x18,0x33,0x63,0x00, // %
00162     0x1C,0x36,0x1C,0x3B,0x6E,0x66,0x3B,0x00, // &
00163     0x30,0x30,0x60,0x00,0x00,0x00,0x00,0x00, // '
00164     0x0C,0x18,0x30,0x30,0x30,0x18,0x0C,0x00, // (
00165     0x30,0x18,0x0C,0x0C,0x0C,0x18,0x30,0x00, // )
00166     0x00,0x66,0x3C,0xFF,0x3C,0x66,0x00,0x00, // *
00167     0x00,0x30,0x30,0xFC,0x30,0x30,0x00,0x00, // +
00168     0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x30, // ,
00169     0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x00, // -
00170     0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00, // .
00171     0x03,0x06,0x0C,0x18,0x30,0x60,0x40,0x00, // / (forward slash)
00172     0x3E,0x63,0x63,0x6B,0x63,0x63,0x3E,0x00, // 0 0x30
00173     0x18,0x38,0x58,0x18,0x18,0x18,0x7E,0x00, // 1
00174     0x3C,0x66,0x06,0x1C,0x30,0x66,0x7E,0x00, // 2
00175     0x3C,0x66,0x06,0x1C,0x06,0x66,0x3C,0x00, // 3
00176     0x0E,0x1E,0x36,0x66,0x7F,0x06,0x0F,0x00, // 4
00177     0x7E,0x60,0x7C,0x06,0x06,0x66,0x3C,0x00, // 5
00178     0x1C,0x30,0x60,0x7C,0x66,0x66,0x3C,0x00, // 6
00179     0x7E,0x66,0x06,0x0C,0x18,0x18,0x18,0x00, // 7
00180     0x3C,0x66,0x66,0x3C,0x66,0x66,0x3C,0x00, // 8
00181     0x3C,0x66,0x66,0x3E,0x06,0x0C,0x38,0x00, // 9
00182     0x00,0x18,0x18,0x00,0x00,0x18,0x18,0x00, // :
00183     0x00,0x18,0x18,0x00,0x00,0x18,0x18,0x30, // ;
00184     0x0C,0x18,0x30,0x60,0x30,0x18,0x0C,0x00, // <
00185     0x00,0x00,0x7E,0x00,0x00,0x7E,0x00,0x00, // =
00186     0x30,0x18,0x0C,0x06,0x0C,0x18,0x30,0x00, // >
00187     0x3C,0x66,0x06,0x0C,0x18,0x00,0x18,0x00, // ?
00188     0x3E,0x63,0x6F,0x69,0x6F,0x60,0x3E,0x00, // @ 0x40
00189     0x18,0x3C,0x66,0x66,0x7E,0x66,0x66,0x00, // A
00190     0x7E,0x33,0x33,0x3E,0x33,0x33,0x7E,0x00, // B
00191     0x1E,0x33,0x60,0x60,0x60,0x33,0x1E,0x00, // C
00192     0x7C,0x36,0x33,0x33,0x33,0x36,0x7C,0x00, // D
00193     0x7F,0x31,0x34,0x3C,0x34,0x31,0x7F,0x00, // E
00194     0x7F,0x31,0x34,0x3C,0x34,0x30,0x78,0x00, // F
00195     0x1E,0x33,0x60,0x60,0x67,0x33,0x1F,0x00, // G
00196     0x66,0x66,0x66,0x7E,0x66,0x66,0x66,0x00, // H
00197     0x3C,0x18,0x18,0x18,0x18,0x18,0x3C,0x00, // I
00198     0x0F,0x06,0x06,0x06,0x66,0x66,0x3C,0x00, // J
00199     0x73,0x33,0x36,0x3C,0x36,0x33,0x73,0x00, // K
00200     0x78,0x30,0x30,0x30,0x31,0x33,0x7F,0x00, // L
00201     0x63,0x77,0x7F,0x7F,0x6B,0x63,0x63,0x00, // M
00202     0x63,0x73,0x7B,0x6F,0x67,0x63,0x63,0x00, // N
00203     0x3E,0x63,0x63,0x63,0x63,0x63,0x3E,0x00, // O
00204     0x7E,0x33,0x33,0x3E,0x30,0x30,0x78,0x00, // P 0x50
00205     0x3C,0x66,0x66,0x66,0x6E,0x3C,0x0E,0x00, // Q
00206     0x7E,0x33,0x33,0x3E,0x36,0x33,0x73,0x00, // R
00207     0x3C,0x66,0x30,0x18,0x0C,0x66,0x3C,0x00, // S
00208     0x7E,0x5A,0x18,0x18,0x18,0x18,0x3C,0x00, // T
00209     0x66,0x66,0x66,0x66,0x66,0x66,0x7E,0x00, // U
00210     0x66,0x66,0x66,0x66,0x66,0x3C,0x18,0x00, // V
00211     0x63,0x63,0x63,0x6B,0x7F,0x77,0x63,0x00, // W
00212     0x63,0x63,0x36,0x1C,0x1C,0x36,0x63,0x00, // X
00213     0x66,0x66,0x66,0x3C,0x18,0x18,0x3C,0x00, // Y
00214     0x7F,0x63,0x46,0x0C,0x19,0x33,0x7F,0x00, // Z
00215     0x3C,0x30,0x30,0x30,0x30,0x30,0x3C,0x00, // [
00216     0x60,0x30,0x18,0x0C,0x06,0x03,0x01,0x00, // \ (back slash)
00217     0x3C,0x0C,0x0C,0x0C,0x0C,0x0C,0x3C,0x00, // ]
00218     0x08,0x1C,0x36,0x63,0x00,0x00,0x00,0x00, // ^
00219     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF, // _
00220     0x18,0x18,0x0C,0x00,0x00,0x00,0x00,0x00, // ` 0x60
00221     0x00,0x00,0x3C,0x06,0x3E,0x66,0x3B,0x00, // a
00222     0x70,0x30,0x3E,0x33,0x33,0x33,0x6E,0x00, // b
00223     0x00,0x00,0x3C,0x66,0x60,0x66,0x3C,0x00, // c
00224     0x0E,0x06,0x3E,0x66,0x66,0x66,0x3B,0x00, // d
00225     0x00,0x00,0x3C,0x66,0x7E,0x60,0x3C,0x00, // e
00226     0x1C,0x36,0x30,0x78,0x30,0x30,0x78,0x00, // f
00227     0x00,0x00,0x3B,0x66,0x66,0x3E,0x06,0x7C, // g
00228     0x70,0x30,0x36,0x3B,0x33,0x33,0x73,0x00, // h
00229     0x18,0x00,0x38,0x18,0x18,0x18,0x3C,0x00, // i
00230     0x06,0x00,0x06,0x06,0x06,0x66,0x66,0x3C, // j
00231     0x70,0x30,0x33,0x36,0x3C,0x36,0x73,0x00, // k
00232     0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00, // l
00233     0x00,0x00,0x66,0x7F,0x7F,0x6B,0x63,0x00, // m
00234     0x00,0x00,0x7C,0x66,0x66,0x66,0x66,0x00, // n
00235     0x00,0x00,0x3C,0x66,0x66,0x66,0x3C,0x00, // o
00236     0x00,0x00,0x6E,0x33,0x33,0x3E,0x30,0x78, // p
00237     0x00,0x00,0x3B,0x66,0x66,0x3E,0x06,0x0F, // q
00238     0x00,0x00,0x6E,0x3B,0x33,0x30,0x78,0x00, // r
00239     0x00,0x00,0x3E,0x60,0x3C,0x06,0x7C,0x00, // s
00240     0x08,0x18,0x3E,0x18,0x18,0x1A,0x0C,0x00, // t
00241     0x00,0x00,0x66,0x66,0x66,0x66,0x3B,0x00, // u
00242     0x00,0x00,0x66,0x66,0x66,0x3C,0x18,0x00, // v
00243     0x00,0x00,0x63,0x6B,0x7F,0x7F,0x36,0x00, // w
00244     0x00,0x00,0x63,0x36,0x1C,0x36,0x63,0x00, // x
00245     0x00,0x00,0x66,0x66,0x66,0x3E,0x06,0x7C, // y
00246     0x00,0x00,0x7E,0x4C,0x18,0x32,0x7E,0x00, // z
00247     0x0E,0x18,0x18,0x70,0x18,0x18,0x0E,0x00, // {
00248     0x0C,0x0C,0x0C,0x00,0x0C,0x0C,0x0C,0x00, // |
00249     0x70,0x18,0x18,0x0E,0x18,0x18,0x70,0x00, // }
00250     0x3B,0x6E,0x00,0x00,0x00,0x00,0x00,0x00, // ~
00251     0x1C,0x36,0x36,0x1C,0x00,0x00,0x00,0x00
00252 }; // DEL
00253 
00254 void NokiaLCD::locate(int column, int row) {
00255     _column = column;
00256     _row = row;
00257 }
00258 
00259 void NokiaLCD::newline() {
00260     _column = 0;
00261     _row++;
00262     if (_row >= _rows) {
00263         _row = 0;
00264     }
00265 }
00266 
00267 int NokiaLCD::_putc(int value) {
00268     int x = _column * 8;  // FIXME: Char sizes
00269     int y = _row * 8;
00270     bitblit(x + 1, y + 1, 8, 8, (char*)&(FONT8x8[value - 0x1F][0]));
00271 
00272     _column++;
00273 
00274     if (_column >= NOKIALCD_COLS) {
00275         _row++;
00276         _column = 0;
00277     }
00278 
00279     if (_row >= NOKIALCD_ROWS) {
00280         _row = 0;
00281     }
00282 
00283     return value;
00284 }
00285 
00286 void NokiaLCD::cls() {
00287     fill(0, 0, NOKIALCD_WIDTH, NOKIALCD_HEIGHT, _background);
00288     _row = 0;
00289     _column = 0;
00290 }
00291 
00292 
00293 void NokiaLCD::window(int x, int y, int width, int height) {
00294     _cs = 0;
00295     _window(x, y, width, height);
00296     _cs = 1;
00297 }
00298 
00299 void NokiaLCD::putp(int colour) {
00300     _cs = 0;
00301     _putp(colour);
00302     _cs = 1;
00303 }
00304 
00305 void NokiaLCD::pixel(int x, int y, int colour) {
00306     _cs = 0;
00307     _window(x, y, 1, 1);
00308     _putp(colour);
00309     _cs = 1;
00310 }
00311 
00312 void NokiaLCD::fill(int x, int y, int width, int height, int colour) {
00313     _cs = 0;
00314     _window(x, y, width, height);
00315     for (int i=0; i<width*height; i++) {
00316         _putp(colour);
00317     }
00318     _window(0, 0, NOKIALCD_WIDTH, NOKIALCD_HEIGHT);
00319     _cs = 1;
00320 }
00321 
00322 void NokiaLCD::circle(int x0, int y0, int r, int colour) {
00323     int draw_x0, draw_y0;
00324     int draw_x1, draw_y1;
00325     int draw_x2, draw_y2;
00326     int draw_x3, draw_y3;
00327     int draw_x4, draw_y4;
00328     int draw_x5, draw_y5;
00329     int draw_x6, draw_y6;
00330     int draw_x7, draw_y7;
00331     int xx, yy;
00332     int di;    
00333 
00334     _cs = 0;
00335     _window(x0, y0, 1, 1);
00336 
00337     if(r == 0)          /* no radius */
00338     {
00339         return;
00340     }
00341 
00342     draw_x0 = draw_x1 = x0;
00343     draw_y0 = draw_y1 = y0 + r;
00344     if(draw_y0 < NOKIALCD_HEIGHT)
00345     {
00346         _window(draw_x0, draw_y0, 1, 1);
00347         _putp(colour);     /* 90 degree */
00348     }
00349 
00350     draw_x2 = draw_x3 = x0;
00351     draw_y2 = draw_y3 = y0 - r;
00352     if(draw_y2 >= 0)
00353     {
00354         _window(draw_x2, draw_y2, 1, 1);
00355         _putp(colour);    /* 270 degree */
00356     }
00357     
00358     draw_x4 = draw_x6 = x0 + r;
00359     draw_y4 = draw_y6 = y0;
00360     if(draw_x4 < NOKIALCD_WIDTH)
00361     {
00362         _window(draw_x4, draw_y4, 1, 1);
00363         _putp(colour);     /* 0 degree */
00364     }    
00365     
00366     draw_x5 = draw_x7 = x0 - r;
00367     draw_y5 = draw_y7 = y0;
00368     if(draw_x5>=0)
00369     {
00370         _window(draw_x5, draw_y5, 1, 1);
00371         _putp(colour);     /* 90 degree */     /* 180 degree */
00372     }
00373         
00374     if(r == 1)
00375     {
00376         return;
00377     }    
00378     
00379     di = 3 - 2*r;
00380     xx = 0;
00381     yy = r;
00382     while(xx < yy)
00383     {
00384 
00385         if(di < 0)
00386         {
00387             di += 4*xx + 6;
00388         }
00389         else
00390         {
00391             di += 4*(xx - yy) + 10;
00392             yy--;
00393             draw_y0--;
00394             draw_y1--;
00395             draw_y2++;
00396             draw_y3++;
00397             draw_x4--;
00398             draw_x5++;
00399             draw_x6--;
00400             draw_x7++;
00401         }
00402         xx++;
00403         draw_x0++;
00404         draw_x1--;
00405         draw_x2++;
00406         draw_x3--;
00407         draw_y4++;
00408         draw_y5++;
00409         draw_y6--;
00410         draw_y7--;
00411 
00412         if( (draw_x0 <= NOKIALCD_WIDTH) && (draw_y0>=0) )
00413         {
00414             _window(draw_x0, draw_y0, 1, 1);
00415             _putp(colour);
00416         }
00417 
00418         if( (draw_x1 >= 0) && (draw_y1 >= 0) )
00419         {
00420             _window(draw_x1, draw_y1, 1, 1);
00421             _putp(colour);
00422         }
00423 
00424         if( (draw_x2 <= NOKIALCD_WIDTH) && (draw_y2 <= NOKIALCD_HEIGHT) )
00425         {
00426             _window(draw_x2, draw_y2, 1, 1);
00427             _putp(colour);
00428         }
00429 
00430         if( (draw_x3 >=0 ) && (draw_y3 <= NOKIALCD_HEIGHT) )
00431         {
00432             _window(draw_x3, draw_y3, 1, 1);
00433             _putp(colour);
00434         }
00435 
00436         if( (draw_x4 <= /*OLED_DISPLAY_HEIGHT*/NOKIALCD_WIDTH) && (draw_y4 >= 0) )
00437         {
00438             _window(draw_x4, draw_y4, 1, 1);
00439             _putp(colour);
00440         }
00441 
00442         if( (draw_x5 >= 0) && (draw_y5 >= 0) )
00443         {
00444             _window(draw_x5, draw_y5, 1, 1);
00445             _putp(colour);
00446         }
00447         if( (draw_x6 <= NOKIALCD_WIDTH) && (draw_y6 <= NOKIALCD_HEIGHT) )
00448         {
00449             _window(draw_x6, draw_y6, 1, 1);
00450             _putp(colour);
00451         }
00452         if( (draw_x7 >= 0) && (draw_y7 <= NOKIALCD_HEIGHT) )
00453         {
00454             _window(draw_x7, draw_y7, 1, 1);
00455             _putp(colour);
00456         }
00457     }
00458     _cs = 1;
00459     return;
00460 }
00461 
00462 void NokiaLCD::line(int x0, int y0, int x1, int y1, int colour) {
00463     int   dx = 0, dy = 0;
00464     int   dx_sym = 0, dy_sym = 0;
00465     int   dx_x2 = 0, dy_x2 = 0;
00466     int   di = 0;
00467 
00468     _cs = 0;            // Chipselect the LCD. 
00469 
00470     dx = x1-x0;
00471     dy = y1-y0;
00472 
00473 
00474     if(dx == 0)           /* vertical line */
00475     {
00476         for(int y=y0; y<y1; y++){
00477             _window(x0, y, 1, 1);
00478             _putp(colour);
00479         }
00480         return;
00481     }
00482 
00483     if(dx > 0)
00484     {
00485         dx_sym = 1;
00486     }
00487     else
00488     {
00489         dx_sym = -1;
00490     }
00491 
00492 
00493     if(dy == 0)           /* horizontal line */
00494     {
00495         for(int x=x0; x<x1; x++){
00496             _window(x, y0, 1, 1);
00497             _putp(colour);
00498         }
00499         return;
00500     }
00501 
00502 
00503     if(dy > 0)
00504     {
00505         dy_sym = 1;
00506     }
00507     else
00508     {
00509         dy_sym = -1;
00510     }
00511 
00512     dx = dx_sym*dx;
00513     dy = dy_sym*dy;
00514 
00515     dx_x2 = dx*2;
00516     dy_x2 = dy*2;
00517 
00518     if(dx >= dy)
00519     {
00520         di = dy_x2 - dx;
00521         while(x0 != x1)
00522         {
00523 
00524             _window(x0, y0, 1, 1);
00525             _putp(colour);
00526             x0 += dx_sym;
00527             if(di<0)
00528             {
00529                 di += dy_x2;
00530             }
00531             else
00532             {
00533                 di += dy_x2 - dx_x2;
00534                 y0 += dy_sym;
00535             }
00536         }
00537         _window(x0, y0, 1, 1);
00538         _putp(colour);
00539     }
00540     else
00541     {
00542         di = dx_x2 - dy;
00543         while(y0 != y1)
00544         {
00545             _window(x0, y0, 1, 1);
00546             _putp(colour);
00547             y0 += dy_sym;
00548             if(di < 0)
00549             {
00550                 di += dx_x2;
00551             }
00552             else
00553             {
00554                 di += dx_x2 - dy_x2;
00555                 x0 += dx_sym;
00556             }
00557         }
00558         _window(x0, y0, 1, 1);
00559         _putp(colour);
00560     }
00561     _cs = 1;
00562     return;
00563 }
00564 
00565 void NokiaLCD::blit(int x, int y, int width, int height, const int* colour) {
00566     _cs = 0;
00567     _window(x, y, width, height);
00568     for (int i=0; i<width*height; i++) {
00569         _putp(colour[i]);
00570     }
00571     _window(0, 0, NOKIALCD_WIDTH, NOKIALCD_HEIGHT);
00572     _cs = 1;
00573 }
00574 
00575 void NokiaLCD::bitblit(int x, int y, int width, int height, const char* bitstream) {
00576     _cs = 0;
00577     _window(x, y, width, height);
00578     for (int i=0; i<height*width; i++) {
00579         int byte = i / 8;
00580         int bit = i % 8;
00581         int colour = ((bitstream[byte] << bit) & 0x80) ? _foreground : _background;
00582         _putp(colour);
00583     }
00584     _window(0, 0, _width, _height);
00585     _cs = 1;
00586 }
00587 
00588 void NokiaLCD::foreground(int c) {
00589     _foreground = c;
00590 }
00591 
00592 void NokiaLCD::background(int c) {
00593     _background = c;
00594 }
00595 
00596 int NokiaLCD::width() {
00597     return NOKIALCD_WIDTH;
00598 }
00599 
00600 int NokiaLCD::height() {
00601     return NOKIALCD_HEIGHT;
00602 }
00603 
00604 int NokiaLCD::columns() {
00605     return NOKIALCD_COLS;
00606 }
00607 
00608 int NokiaLCD::rows() {
00609     return NOKIALCD_ROWS;
00610 }