Added software implementation
This commit is contained in:
@ -49,26 +49,25 @@
|
||||
#include "platform.h"
|
||||
#include "xil_printf.h"
|
||||
#include "xil_io.h"
|
||||
|
||||
#include <simplevga.h>
|
||||
|
||||
|
||||
#define SIMPELVGA_REG_BASE (0x43c00000)
|
||||
#define SIMPELVGA_REG_X (SIMPELVGA_REG_BASE + 0)
|
||||
#define SIMPELVGA_REG_Y (SIMPELVGA_REG_BASE + 4)
|
||||
#define SIMPELVGA_REG_COLOR (SIMPELVGA_REG_BASE + 8)
|
||||
int main()
|
||||
{
|
||||
init_platform();
|
||||
|
||||
print("Hello World\n\r");
|
||||
SIMPLEVGA_mWriteReg(XPAR_SIMPLEVGA_0_S00_AXI_BASEADDR, SIMPLEVGA_S00_AXI_SLV_REG0_OFFSET, 0xFFFFFFFF);
|
||||
SIMPLEVGA_mWriteReg(XPAR_SIMPLEVGA_0_S00_AXI_BASEADDR, SIMPLEVGA_S00_AXI_SLV_REG1_OFFSET, 0xFFFFFFFF);
|
||||
SIMPLEVGA_mWriteReg(XPAR_SIMPLEVGA_0_S00_AXI_BASEADDR, SIMPLEVGA_S00_AXI_SLV_REG2_OFFSET, 0xFFFFFFFF);
|
||||
unsigned long x = 1;
|
||||
Xil_Out32(SIMPELVGA_REG_X, (460 << 16) + 160);
|
||||
Xil_Out32(SIMPELVGA_REG_Y, (360 << 16) + 120);
|
||||
while(1) {
|
||||
for(x = 1; x < 100; x++) {
|
||||
unsigned long xreg = ((640-x) << 16) + x;
|
||||
SIMPLEVGA_mWriteReg(XPAR_SIMPLEVGA_0_S00_AXI_BASEADDR, SIMPLEVGA_S00_AXI_SLV_REG0_OFFSET, x);
|
||||
unsigned long x;
|
||||
for(x = 0; x <= 0b111111; x++) {
|
||||
Xil_Out32(SIMPELVGA_REG_COLOR, x);
|
||||
printf("Set color %x\n",x);
|
||||
sleep(1);
|
||||
}
|
||||
}
|
||||
cleanup_platform();
|
||||
return 0;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user