#include <irq.h>
#include <uart.h>
+#include <console.h>
#include <hw/csr.h>
#include <hw/flags.h>
static int d0, d1, d2;
+static unsigned int framebuffer[640*480] __attribute__((aligned(16)));
static void print_status(void)
{
dvisampler0_resdetection_vres_read());
}
+static void capture_fb(void)
+{
+ dvisampler0_dma_base_write((unsigned int)framebuffer);
+ dvisampler0_dma_length_write(sizeof(framebuffer));
+ dvisampler0_dma_shoot_write(1);
+
+ printf("waiting for DMA...");
+ while(dvisampler0_dma_busy_read());
+ printf("done\n");
+}
+
static void calibrate_delays(void)
{
dvisampler0_data0_cap_dly_ctl_write(DVISAMPLER_DELAY_CAL);
adjust_phase();
counter = 0;
}
+ if(readchar_nonblock() && (readchar() == 'c'))
+ capture_fb();
}
printf("PLL unlocked\n");
}
puts("Minimal video mixer software built "__DATE__" "__TIME__"\n");
+ fb_base_write((unsigned int)framebuffer);
+ fb_enable_write(1);
vmix();
return 0;