summaryrefslogtreecommitdiff
path: root/firmware/drivers/serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/serial.c')
-rw-r--r--firmware/drivers/serial.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/firmware/drivers/serial.c b/firmware/drivers/serial.c
index 2badf2e39f..11dadc6f19 100644
--- a/firmware/drivers/serial.c
+++ b/firmware/drivers/serial.c
@@ -35,12 +35,6 @@
35#define VOLUP 0xD0 35#define VOLUP 0xD0
36#define VOLDN 0xE0 36#define VOLDN 0xE0
37 37
38#ifdef SCREENDUMP
39#define SCRDMP 0xF0
40
41static void screen_dump(void);
42#endif
43
44void serial_setup (void) 38void serial_setup (void)
45{ 39{
46 /* Set PB10 function to serial Rx */ 40 /* Set PB10 function to serial Rx */
@@ -118,11 +112,6 @@ int remote_control_rx(void)
118 last_valid_button = BUTTON_RC_RIGHT; 112 last_valid_button = BUTTON_RC_RIGHT;
119 break; 113 break;
120 114
121#ifdef SCREENDUMP
122 case SCRDMP:
123 screen_dump();
124 break;
125#endif
126 default: 115 default:
127 last_valid_button = BUTTON_NONE; 116 last_valid_button = BUTTON_NONE;
128 break; 117 break;
@@ -144,43 +133,3 @@ int remote_control_rx(void)
144 133
145 return ret; 134 return ret;
146} 135}
147
148#ifdef SCREENDUMP
149static void serial_enable_tx(void)
150{
151 SCR1 |= 0x20;
152}
153
154static void serial_tx(unsigned char ch)
155{
156 while (!(SSR1 & SCI_TDRE))
157 {
158 ;
159 }
160
161 /*
162 * Write data into TDR and clear TDRE
163 */
164 TDR1 = ch;
165 SSR1 &= ~SCI_TDRE;
166}
167
168static void screen_dump(void)
169{
170 int x, y;
171 int level;
172
173 serial_enable_tx();
174
175 level = set_irq_level(HIGHEST_IRQ_LEVEL);
176 for(y = 0;y < LCD_HEIGHT/8;y++)
177 {
178 for(x = 0;x < LCD_WIDTH;x++)
179 {
180 serial_tx(lcd_framebuffer[y][x]);
181 }
182 }
183 set_irq_level(level);
184}
185
186#endif