summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/target/arm/as3525/sansa-clip/lcd-ssd1303.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/firmware/target/arm/as3525/sansa-clip/lcd-ssd1303.c b/firmware/target/arm/as3525/sansa-clip/lcd-ssd1303.c
index 465c18e8ac..dba5b9c3d7 100644
--- a/firmware/target/arm/as3525/sansa-clip/lcd-ssd1303.c
+++ b/firmware/target/arm/as3525/sansa-clip/lcd-ssd1303.c
@@ -183,11 +183,10 @@ void lcd_write_data(const fb_data* p_bytes, int count)
183 183
184 while (count--) 184 while (count--)
185 { 185 {
186 while(SSP_SR & (1<<1)) /* Transmit FIFO is not full */ 186 while(!(SSP_SR & (1<<1))) /* wait until transmit FIFO is not full */
187 SSP_DATA = *p_bytes++;
188
189 while(!(SSP_SR & (1<<0))) /* Transmit FIFO is not empty */
190 ; 187 ;
188
189 SSP_DATA = *p_bytes++;
191 } 190 }
192} 191}
193#endif 192#endif
@@ -289,10 +288,8 @@ void lcd_init_device(void)
289#elif defined(SANSA_CLIPPLUS) 288#elif defined(SANSA_CLIPPLUS)
290 GPIOA_DIR |= (1<<5); 289 GPIOA_DIR |= (1<<5);
291 GPIOB_DIR |= (1<<2) | (1<<7); 290 GPIOB_DIR |= (1<<2) | (1<<7);
292 GPIOA_PIN(5) = 0; 291 GPIOB_PIN(7) = 0;
293 GPIOA_DIR &= (1<<0); 292 GPIOA_PIN(5) = (1<<5);
294 GPIOA_PIN(0) = (1<<0);
295 GPIOB_PIN(7) = (1<<7);
296#endif 293#endif
297 294
298 /* Set display clock (divide ratio = 1) and oscillator frequency (1) */ 295 /* Set display clock (divide ratio = 1) and oscillator frequency (1) */