1.1 --- a/include/vga_display.h Wed Oct 24 15:56:57 2018 +0200
1.2 +++ b/include/vga_display.h Wed Oct 24 18:11:22 2018 +0200
1.3 @@ -20,6 +20,7 @@
1.4 #ifndef __VGA_DISPLAY_H__
1.5 #define __VGA_DISPLAY_H__
1.6
1.7 +#include "pic32_c.h"
1.8 #include "display.h"
1.9
1.10
1.11 @@ -32,11 +33,9 @@
1.12
1.13 void (*state_handler)();
1.14
1.15 - /* Display state handlers. */
1.16 + /* DMA transfer properties. */
1.17
1.18 - void (*start_visible)();
1.19 - void (*update_visible)();
1.20 - void (*stop_visible)();
1.21 + int line_channels, initiating_int_num;
1.22
1.23 /* Horizontal and vertical sync peripherals. */
1.24
1.25 @@ -60,13 +59,19 @@
1.26
1.27 /* Initialisation. */
1.28
1.29 -void init_vga(display_config_t *display_config,
1.30 - void (*start_visible)(),
1.31 - void (*update_visible)(),
1.32 - void (*stop_visible)());
1.33 +void init_vga(display_config_t *display_config, int line_channels,
1.34 + int initiating_int_num);
1.35
1.36 void vga_configure_sync(int hsync_unit, int vsync_unit, int timer);
1.37
1.38 +void vga_configure_transfer(int transfer_int_num, uint32_t output);
1.39 +
1.40 +void vga_configure_line_channel(int channel, int int_num, enum dma_chain chain,
1.41 + uint32_t output);
1.42 +
1.43 +void vga_configure_zero_channel(int channel, int int_num, int initiating,
1.44 + uint32_t output);
1.45 +
1.46 /* Interrupt handlers. */
1.47
1.48 void vga_interrupt_handler(void);
1.49 @@ -78,6 +83,13 @@
1.50 void vfp_active(void);
1.51 void vsync_active(void);
1.52
1.53 +/* Display operations. */
1.54 +
1.55 +void start_visible(void);
1.56 +void update_visible(void);
1.57 +void stop_visible(void);
1.58 +void update_transfers(int enable);
1.59 +
1.60 /* Vertical sync operations. */
1.61
1.62 void vsync_high(void);