diff options
Diffstat (limited to 'firmware/target/arm/as3525')
-rw-r--r-- | firmware/target/arm/as3525/button-e200v2-fuze.c | 10 | ||||
-rw-r--r-- | firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c | 10 | ||||
-rw-r--r-- | firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c | 12 |
3 files changed, 19 insertions, 13 deletions
diff --git a/firmware/target/arm/as3525/button-e200v2-fuze.c b/firmware/target/arm/as3525/button-e200v2-fuze.c index 6a9f02959c..5518f981e8 100644 --- a/firmware/target/arm/as3525/button-e200v2-fuze.c +++ b/firmware/target/arm/as3525/button-e200v2-fuze.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #define WHEEL_COUNTER_DIV 4 | 32 | #define WHEEL_COUNTER_DIV 4 |
33 | #define ACCEL_INCREMENT 2 | 33 | #define ACCEL_INCREMENT 2 |
34 | #define ACCEL_SHIFT 2 | 34 | #define ACCEL_SHIFT 2 |
35 | #define BUTTON_DELAY 45 | 35 | #define BUTTON_DELAY 30 |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | #ifdef SANSA_E200V2 | 38 | #ifdef SANSA_E200V2 |
@@ -246,6 +246,11 @@ static int button_gpio(void) | |||
246 | int btn = BUTTON_NONE; | 246 | int btn = BUTTON_NONE; |
247 | if(hold_button) | 247 | if(hold_button) |
248 | return btn; | 248 | return btn; |
249 | |||
250 | /* disable DBOP output while changing GPIO pins that share lines with it */ | ||
251 | DBOP_CTRL &= ~(1<<16); | ||
252 | button_delay(); | ||
253 | |||
249 | /* set afsel, so that we can read our buttons */ | 254 | /* set afsel, so that we can read our buttons */ |
250 | GPIOC_AFSEL &= ~(1<<2|1<<3|1<<4|1<<5|1<<6); | 255 | GPIOC_AFSEL &= ~(1<<2|1<<3|1<<4|1<<5|1<<6); |
251 | /* set dir so we can read our buttons (but reset the C pins first) */ | 256 | /* set dir so we can read our buttons (but reset the C pins first) */ |
@@ -276,7 +281,8 @@ static int button_gpio(void) | |||
276 | /* return to settings needed for lcd */ | 281 | /* return to settings needed for lcd */ |
277 | GPIOC_DIR |= (1<<2|1<<3|1<<4|1<<5|1<<6); | 282 | GPIOC_DIR |= (1<<2|1<<3|1<<4|1<<5|1<<6); |
278 | GPIOC_AFSEL |= (1<<2|1<<3|1<<4|1<<5|1<<6); | 283 | GPIOC_AFSEL |= (1<<2|1<<3|1<<4|1<<5|1<<6); |
279 | 284 | ||
285 | DBOP_CTRL |= (1<<16); /* enable output again */ | ||
280 | return btn; | 286 | return btn; |
281 | } | 287 | } |
282 | 288 | ||
diff --git a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c index e25494dddd..b19f8ea65b 100644 --- a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c +++ b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c | |||
@@ -170,16 +170,16 @@ void lcd_write_data(const fb_data* p_bytes, int count) | |||
170 | DBOP_DOUT32 = *data++; | 170 | DBOP_DOUT32 = *data++; |
171 | count -= 2; | 171 | count -= 2; |
172 | 172 | ||
173 | /* TODO: We should normally fill the fifo until it's full | 173 | /* Wait if push fifo is full */ |
174 | * instead of waiting after each word, | 174 | while ((DBOP_STAT & (1<<6)) != 0); |
175 | * but that causes blue lines on the display */ | ||
176 | while ((DBOP_STAT & (1<<10)) == 0); | ||
177 | } | 175 | } |
178 | |||
179 | /* due to the 32bit alignment requirement, we possibly need to do a | 176 | /* due to the 32bit alignment requirement, we possibly need to do a |
180 | * 16bit transfer at the end also */ | 177 | * 16bit transfer at the end also */ |
181 | if (count > 0) | 178 | if (count > 0) |
182 | lcd_write_single_data16(*(fb_data*)data); | 179 | lcd_write_single_data16(*(fb_data*)data); |
180 | |||
181 | /* While push fifo is not empty */ | ||
182 | while ((DBOP_STAT & (1<<10)) == 0); | ||
183 | } | 183 | } |
184 | 184 | ||
185 | static void lcd_write_reg(int reg, int value) | 185 | static void lcd_write_reg(int reg, int value) |
diff --git a/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c b/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c index fc0fdaae10..2b7ce4888d 100644 --- a/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c +++ b/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c | |||
@@ -116,16 +116,16 @@ void lcd_write_data(const fb_data* p_bytes, int count) | |||
116 | DBOP_DOUT32 = *data++; | 116 | DBOP_DOUT32 = *data++; |
117 | count -= 2; | 117 | count -= 2; |
118 | 118 | ||
119 | /* Wait for fifo to empty */ | 119 | /* Wait if push fifo is full */ |
120 | /* TODO: We should normally fill the fifo until it's full | 120 | while ((DBOP_STAT & (1<<6)) != 0); |
121 | * instead of waiting after each word, | ||
122 | * but that causes blue lines on the display */ | ||
123 | while ((DBOP_STAT & (1<<10)) == 0); | ||
124 | } | 121 | } |
125 | /* due to the 32bit alignment requirement, we possibly need to do a | 122 | /* due to the 32bit alignment requirement, we possibly need to do a |
126 | * 16bit transfer at the end also */ | 123 | * 16bit transfer at the end also */ |
127 | if (count > 0) | 124 | if (count > 0) |
128 | lcd_write_single_data16(*(fb_data*)data); | 125 | lcd_write_single_data16(*(fb_data*)data); |
126 | |||
127 | /* While push fifo is not empty */ | ||
128 | while ((DBOP_STAT & (1<<10)) == 0); | ||
129 | } | 129 | } |
130 | 130 | ||
131 | static void lcd_write_reg(int reg, int value) | 131 | static void lcd_write_reg(int reg, int value) |