| 390 | } |
| 391 | |
| 392 | static uint32_t lcd_dma(enum sched_item_id id) { |
| 393 | uint32_t ticks; |
| 394 | if (unlikely(lcd.prefill)) { |
| 395 | if (!lcd.pos) { |
| 396 | lcd.upcurr = lcd.upbase; |
| 397 | } |
| 398 | lcd_fill_bytes(64); |
| 399 | if ((lcd.prefill = lcd.pos)) { |
| 400 | sched_repeat(id, lcd.pos == 128 ? 22 : 19); |
| 401 | } else if (lcd.compare == LCD_FRONT_PORCH) { |
| 402 | sched_repeat_relative(SCHED_LCD_DMA, SCHED_LCD, (lcd.HSW + lcd.HBP) * lcd.PCD, 0); |
| 403 | } |
| 404 | return lcd.pos & 64 ? 18 : 19; |
| 405 | } |
| 406 | ticks = lcd_words(lcd.WTRMRK ? 16 : 8); |
| 407 | lcd_fill_bytes(lcd.WTRMRK ? 64 : 32); |
| 408 | if (lcd.curRow < lcd.LPP) { |
| 409 | sched_repeat(id, ticks); |
| 410 | } |
| 411 | return lcd.WTRMRK ? 19 : 11; |
| 412 | } |
| 413 | |
| 414 | static void lcd_init_events(void) { |
| 415 | sched_init_event(SCHED_LCD, CLOCK_24M, lcd_event); |
nothing calls this directly
no test coverage detected