diff options
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/lcd.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/firmware/drivers/lcd.c b/firmware/drivers/lcd.c index d0e2c623de..f33e8e5f2a 100644 --- a/firmware/drivers/lcd.c +++ b/firmware/drivers/lcd.c | |||
@@ -329,24 +329,24 @@ static const unsigned char lcd_ascii[] = { | |||
329 | void lcd_clear_display(void) | 329 | void lcd_clear_display(void) |
330 | { | 330 | { |
331 | int i; | 331 | int i; |
332 | lcd_write(TRUE,LCD_CURSOR(0,0)); | 332 | lcd_write(true,LCD_CURSOR(0,0)); |
333 | for (i=0;i<24;i++) | 333 | for (i=0;i<24;i++) |
334 | lcd_write(FALSE,0); | 334 | lcd_write(false,0); |
335 | } | 335 | } |
336 | 336 | ||
337 | void lcd_puts(int x, int y, char *string) | 337 | void lcd_puts(int x, int y, char *string) |
338 | { | 338 | { |
339 | lcd_write(TRUE,LCD_CURSOR(x,y)); | 339 | lcd_write(true,LCD_CURSOR(x,y)); |
340 | while (*string) | 340 | while (*string) |
341 | lcd_write(FALSE,LCD_ASCII(*string++)); | 341 | lcd_write(false,LCD_ASCII(*string++)); |
342 | } | 342 | } |
343 | 343 | ||
344 | void lcd_define_pattern (int which,char *pattern,int length) | 344 | void lcd_define_pattern (int which,char *pattern,int length) |
345 | { | 345 | { |
346 | int i; | 346 | int i; |
347 | lcd_write(TRUE,LCD_PRAM|which); | 347 | lcd_write(true,LCD_PRAM|which); |
348 | for (i=0;i<length;i++) | 348 | for (i=0;i<length;i++) |
349 | lcd_write(FALSE,pattern[i]); | 349 | lcd_write(false,pattern[i]); |
350 | } | 350 | } |
351 | #endif | 351 | #endif |
352 | 352 | ||
@@ -407,13 +407,13 @@ void lcd_init (void) | |||
407 | PBIOR |= 0x000f; /* IOR = 1 */ | 407 | PBIOR |= 0x000f; /* IOR = 1 */ |
408 | 408 | ||
409 | /* Initialize LCD */ | 409 | /* Initialize LCD */ |
410 | lcd_write (TRUE, LCD_CNTL_RESET); | 410 | lcd_write (true, LCD_CNTL_RESET); |
411 | lcd_write (TRUE, LCD_CNTL_POWER); | 411 | lcd_write (true, LCD_CNTL_POWER); |
412 | lcd_write (TRUE, LCD_CNTL_SEGREMAP); | 412 | lcd_write (true, LCD_CNTL_SEGREMAP); |
413 | lcd_write (TRUE, LCD_CNTL_OUTSCAN); | 413 | lcd_write (true, LCD_CNTL_OUTSCAN); |
414 | lcd_write (TRUE, LCD_CNTL_CONTRAST); | 414 | lcd_write (true, LCD_CNTL_CONTRAST); |
415 | lcd_write (TRUE, 0x30); /* Contrast parameter */ | 415 | lcd_write (true, 0x30); /* Contrast parameter */ |
416 | lcd_write (TRUE, LCD_CNTL_DISPON); | 416 | lcd_write (true, LCD_CNTL_DISPON); |
417 | 417 | ||
418 | lcd_clear_display(); | 418 | lcd_clear_display(); |
419 | lcd_update(); | 419 | lcd_update(); |
@@ -430,12 +430,12 @@ void lcd_update (void) | |||
430 | /* Copy display bitmap to hardware */ | 430 | /* Copy display bitmap to hardware */ |
431 | for (y = 0; y < LCD_HEIGHT/8; y++) | 431 | for (y = 0; y < LCD_HEIGHT/8; y++) |
432 | { | 432 | { |
433 | lcd_write (TRUE, LCD_CNTL_PAGE | (y & 0xf)); | 433 | lcd_write (true, LCD_CNTL_PAGE | (y & 0xf)); |
434 | lcd_write (TRUE, LCD_CNTL_HIGHCOL); | 434 | lcd_write (true, LCD_CNTL_HIGHCOL); |
435 | lcd_write (TRUE, LCD_CNTL_LOWCOL); | 435 | lcd_write (true, LCD_CNTL_LOWCOL); |
436 | 436 | ||
437 | for (x = 0; x < LCD_WIDTH; x++) | 437 | for (x = 0; x < LCD_WIDTH; x++) |
438 | lcd_write (FALSE, display[x][y]); | 438 | lcd_write (false, display[x][y]); |
439 | } | 439 | } |
440 | } | 440 | } |
441 | 441 | ||
@@ -505,8 +505,8 @@ void lcd_putsxy(int x, int y, char *str, int thisfont) | |||
505 | else | 505 | else |
506 | src = char_gen_6x8[ch-ASCII_MIN][0]; | 506 | src = char_gen_6x8[ch-ASCII_MIN][0]; |
507 | 507 | ||
508 | lcd_bitmap (src, lcd_x, lcd_y, nx-1, ny, TRUE); | 508 | lcd_bitmap (src, lcd_x, lcd_y, nx-1, ny, true); |
509 | lcd_bitmap (zeros, lcd_x+nx-1, lcd_y, 1, ny, TRUE); | 509 | lcd_bitmap (zeros, lcd_x+nx-1, lcd_y, 1, ny, true); |
510 | 510 | ||
511 | lcd_x += nx; | 511 | lcd_x += nx; |
512 | } | 512 | } |
@@ -515,7 +515,7 @@ void lcd_putsxy(int x, int y, char *str, int thisfont) | |||
515 | 515 | ||
516 | /* | 516 | /* |
517 | * Display a bitmap at (x, y), size (nx, ny) | 517 | * Display a bitmap at (x, y), size (nx, ny) |
518 | * clear is TRUE to clear destination area first | 518 | * clear is true to clear destination area first |
519 | */ | 519 | */ |
520 | void lcd_bitmap (unsigned char *src, int x, int y, int nx, int ny, | 520 | void lcd_bitmap (unsigned char *src, int x, int y, int nx, int ny, |
521 | bool clear) | 521 | bool clear) |
@@ -593,7 +593,7 @@ void lcd_clearrect (int x, int y, int nx, int ny) | |||
593 | { | 593 | { |
594 | int i; | 594 | int i; |
595 | for (i = 0; i < nx; i++) | 595 | for (i = 0; i < nx; i++) |
596 | lcd_bitmap (zeros, x+i, y, 1, ny, TRUE); | 596 | lcd_bitmap (zeros, x+i, y, 1, ny, true); |
597 | } | 597 | } |
598 | 598 | ||
599 | /* | 599 | /* |
@@ -603,7 +603,7 @@ void lcd_fillrect (int x, int y, int nx, int ny) | |||
603 | { | 603 | { |
604 | int i; | 604 | int i; |
605 | for (i = 0; i < nx; i++) | 605 | for (i = 0; i < nx; i++) |
606 | lcd_bitmap (ones, x+i, y, 1, ny, TRUE); | 606 | lcd_bitmap (ones, x+i, y, 1, ny, true); |
607 | } | 607 | } |
608 | 608 | ||
609 | /* Invert a rectangular area at (x, y), size (nx, ny) */ | 609 | /* Invert a rectangular area at (x, y), size (nx, ny) */ |
@@ -611,7 +611,7 @@ void lcd_invertrect (int x, int y, int nx, int ny) | |||
611 | { | 611 | { |
612 | int i; | 612 | int i; |
613 | for (i = 0; i < nx; i++) | 613 | for (i = 0; i < nx; i++) |
614 | lcd_bitmap (ones, x+i, y, 1, ny, FALSE); | 614 | lcd_bitmap (ones, x+i, y, 1, ny, false); |
615 | } | 615 | } |
616 | 616 | ||
617 | #define DRAW_PIXEL(x,y) display[x][y/8] |= (1<<(y&7)) | 617 | #define DRAW_PIXEL(x,y) display[x][y/8] |= (1<<(y&7)) |