diff options
Diffstat (limited to 'firmware/target/arm/as3525/sansa-clip')
-rw-r--r-- | firmware/target/arm/as3525/sansa-clip/lcd-clip.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/sansa-clip/lcd-clip.c b/firmware/target/arm/as3525/sansa-clip/lcd-clip.c index 21d8902739..8331b9e895 100644 --- a/firmware/target/arm/as3525/sansa-clip/lcd-clip.c +++ b/firmware/target/arm/as3525/sansa-clip/lcd-clip.c | |||
@@ -69,6 +69,34 @@ void lcd_write_command(int byte) | |||
69 | ; | 69 | ; |
70 | } | 70 | } |
71 | 71 | ||
72 | void lcd_write_cmd_triplet(int cmd1, int cmd2, int cmd3) | ||
73 | { | ||
74 | #ifndef LCD_USE_FIFO_FOR_COMMANDS | ||
75 | lcd_write_command(cmd1); | ||
76 | lcd_write_command(cmd2); | ||
77 | lcd_write_command(cmd3); | ||
78 | #else | ||
79 | /* combine writes to data register */ | ||
80 | |||
81 | while ((DBOP_STAT & (1<<10)) == 0) /* While push fifo is not empty */ | ||
82 | ; | ||
83 | /* FIFO is empty at this point */ | ||
84 | |||
85 | /* unset D/C# (data or command) */ | ||
86 | GPIOA_PIN(5) = 0; | ||
87 | |||
88 | /* Write command */ | ||
89 | /* !!makes assumption FIFO is at least (3) levels deep! */ | ||
90 | /* Only bits 15:12 and 3:0 of DBOP_DOUT are meaningful */ | ||
91 | DBOP_DOUT = (cmd1 << 8) | cmd1; | ||
92 | DBOP_DOUT = (cmd2 << 8) | cmd2; | ||
93 | DBOP_DOUT = (cmd3 << 8) | cmd3; | ||
94 | /* While push fifo is not empty */ | ||
95 | while ((DBOP_STAT & (1<<10)) == 0) | ||
96 | ; | ||
97 | #endif | ||
98 | } | ||
99 | |||
72 | void lcd_write_data(const fb_data* p_bytes, int count) | 100 | void lcd_write_data(const fb_data* p_bytes, int count) |
73 | { | 101 | { |
74 | volatile int i = 0; | 102 | volatile int i = 0; |