1.1 --- a/examples/vga/main.c Fri Nov 02 01:53:03 2018 +0100
1.2 +++ b/examples/vga/main.c Fri Nov 02 02:15:09 2018 +0100
1.3 @@ -30,7 +30,12 @@
1.4 #include "font.h"
1.5 #include "main.h"
1.6 #include "vga.h"
1.7 +
1.8 +#ifndef TRANSFER_CPU
1.9 #include "vga_display.h"
1.10 +#else
1.11 +#include "vga_display_cpu.h"
1.12 +#endif
1.13
1.14
1.15
1.16 @@ -260,7 +265,9 @@
1.17 config_uart();
1.18 lock_config();
1.19
1.20 +#ifndef TRANSFER_CPU
1.21 init_dma();
1.22 +#endif
1.23
1.24 #ifdef PARALLEL_MODE
1.25 init_pm();
1.26 @@ -276,7 +283,11 @@
1.27 timer and any transfer timer, with an initiating channel being introduced
1.28 if a transfer timer is specified. */
1.29
1.30 +#ifndef TRANSFER_CPU
1.31 init_vga_with_timers(&display_config, LINE_CHANNELS, LINE_TIMER, TRANSFER_TIMER);
1.32 +#else
1.33 + init_vga_with_timer(&display_config, LINE_TIMER);
1.34 +#endif
1.35
1.36 /* Configure VGA output transfer to the output register, also configuring
1.37 output compare units for horizontal and vertical sync. */
1.38 @@ -317,6 +328,18 @@
1.39 {
1.40 uint32_t ifs;
1.41
1.42 +#ifdef TRANSFER_CPU
1.43 + /* Check for a timer interrupt condition. */
1.44 +
1.45 + ifs = REG(TIMERIFS) & TIMER_INT_FLAGS(LINE_TIMER, TxIF);
1.46 +
1.47 + if (ifs)
1.48 + {
1.49 + vga_transfer_interrupt_handler();
1.50 + CLR_REG(TIMERIFS, ifs);
1.51 + }
1.52 +#endif
1.53 +
1.54 /* Check for a OC1 interrupt condition. */
1.55
1.56 ifs = REG(OCIFS) & OC_INT_FLAGS(1, OCxIF);