summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/lcd-h100-remote.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/firmware/drivers/lcd-h100-remote.c b/firmware/drivers/lcd-h100-remote.c
index af6a45c2c0..eaf61260cb 100644
--- a/firmware/drivers/lcd-h100-remote.c
+++ b/firmware/drivers/lcd-h100-remote.c
@@ -50,14 +50,14 @@
50#define LCD_REMOTE_CNTL_HIGHCOL 0x10 /* Upper column address */ 50#define LCD_REMOTE_CNTL_HIGHCOL 0x10 /* Upper column address */
51#define LCD_REMOTE_CNTL_LOWCOL 0x00 /* Lower column address */ 51#define LCD_REMOTE_CNTL_LOWCOL 0x00 /* Lower column address */
52 52
53#define CS_LO GPIO1_OUT &= ~0x00000004 53#define CS_LO and_l(~0x00000004, &GPIO1_OUT)
54#define CS_HI GPIO1_OUT |= 0x00000004 54#define CS_HI or_l(0x00000004, &GPIO1_OUT)
55#define CLK_LO GPIO_OUT &= ~0x10000000 55#define CLK_LO and_l(~0x10000000, &GPIO_OUT)
56#define CLK_HI GPIO_OUT |= 0x10000000 56#define CLK_HI or_l(0x10000000, &GPIO_OUT)
57#define DATA_LO GPIO1_OUT &= ~0x00040000 57#define DATA_LO and_l(~0x00040000, &GPIO1_OUT)
58#define DATA_HI GPIO1_OUT |= 0x00040000 58#define DATA_HI or_l(0x00040000, &GPIO1_OUT)
59#define RS_LO GPIO_OUT &= ~0x00010000 59#define RS_LO and_l(~0x00010000, &GPIO_OUT)
60#define RS_HI GPIO_OUT |= 0x00010000 60#define RS_HI or_l(0x00010000, &GPIO_OUT)
61 61
62/* delay loop */ 62/* delay loop */
63#define DELAY do { int _x; for(_x=0;_x<3;_x++);} while (0) 63#define DELAY do { int _x; for(_x=0;_x<3;_x++);} while (0)
@@ -115,12 +115,12 @@ static const char scroll_tick_table[16] = {
115#ifndef SIMULATOR 115#ifndef SIMULATOR
116void lcd_remote_backlight_on(void) 116void lcd_remote_backlight_on(void)
117{ 117{
118 GPIO_OUT &= ~0x00000800; 118 and_l(~0x00000800, &GPIO_OUT);
119} 119}
120 120
121void lcd_remote_backlight_off(void) 121void lcd_remote_backlight_off(void)
122{ 122{
123 GPIO_OUT |= 0x00000800; 123 or_l(0x00000800, &GPIO_OUT);
124} 124}
125 125
126void lcd_remote_write_command(int cmd) 126void lcd_remote_write_command(int cmd)
@@ -363,14 +363,14 @@ static void remote_tick(void)
363/* Initialise ports and kick off monitor */ 363/* Initialise ports and kick off monitor */
364void lcd_remote_init(void) 364void lcd_remote_init(void)
365{ 365{
366 GPIO_FUNCTION |= 0x10010800; /* GPIO11: Backlight 366 or_l(0x10010800, &GPIO_FUNCTION); /* GPIO11: Backlight
367 GPIO16: RS 367 GPIO16: RS
368 GPIO28: CLK */ 368 GPIO28: CLK */
369 369
370 GPIO1_FUNCTION |= 0x00040004; /* GPIO34: CS 370 or_l(0x00040004, &GPIO1_FUNCTION); /* GPIO34: CS
371 GPIO50: Data */ 371 GPIO50: Data */
372 GPIO_ENABLE |= 0x10010800; 372 or_l(0x10010800, &GPIO_ENABLE);
373 GPIO1_ENABLE |= 0x00040004; 373 or_l(0x00040004, &GPIO1_ENABLE);
374 374
375 lcd_remote_clear_display(); 375 lcd_remote_clear_display();
376 376