Demo of low res colour vga video for stm32f3 discovery board
Dependencies: STM32F3-Discovery-minimal
Fork of Space_Invaders_Demo by
Diff: demo.c
- Revision:
- 10:8ffcefda667a
- Parent:
- 3:93e488fbb8a2
--- a/demo.c Tue May 29 23:52:40 2018 +0000 +++ b/demo.c Wed May 30 03:23:47 2018 +0000 @@ -1,8 +1,5 @@ /*************************************************************************** * STM32 VGA demo - * Copyright (C) 2012 MASSEY 159.233 Italy - * http://www.MASSEY 159.233.eu - * Written by Ruben H. Meleca ### demo.c @@ -74,16 +71,15 @@ // Demo Point -while(1) { +//while(1) { GPIOE->ODR|=0x100; vidClearScreen(); GPIOE->ODR|=0x200; gdiRectangle(0,0,(VID_PIXELS_X - 1),VID_VSIZE - 1,0); GPIOE->ODR|=0x300; - gdiDrawTextEx(180/4, 40, "MASSEY 159.233", GDI_ROP_COPY); GPIOE->ODR|=0x400; - gdiDrawTextEx(161/4, 55, "STM32F3 DISCOVERY", GDI_ROP_COPY); - gdiDrawTextEx(172/4, 70, "POINT DEMO", GDI_ROP_COPY); + gdiDrawTextEx(40, 55, "STM32F3 Discovery", GDI_ROP_COPY); + gdiDrawTextEx(40, 70, "Point Demo", GDI_ROP_COPY); GPIOE->ODR|=0x500; vidNextBuffer(); sysDelayMs(2000); @@ -104,15 +100,14 @@ // conway_demo(); - if(GPIOA->IDR&1) bubble_demo(); +// if(GPIOA->IDR&1) bubble_demo(); // Demo Line vidClearScreen(); gdiRectangle(0,0,(VID_PIXELS_X - 1),VID_VSIZE - 1,0); - gdiDrawTextEx(180/4, 40, "MASSEY 159.233", GDI_ROP_COPY); - gdiDrawTextEx(161/4, 55, "STM32F3 DISCOVERY", GDI_ROP_COPY); - gdiDrawTextEx(175/4, 70, "LINE DEMO", GDI_ROP_COPY); + gdiDrawTextEx(40, 55, "STM32F3 Discovery", GDI_ROP_COPY); + gdiDrawTextEx(40, 70, "Line Demo", GDI_ROP_COPY); vidNextBuffer(); sysDelayMs(300); srand(sysTicks); @@ -133,13 +128,12 @@ vidClearScreen(); gdiRectangle(0,0,(VID_PIXELS_X - 1),VID_VSIZE - 1,0); - gdiDrawTextEx(180/4, 40, "MASSEY 159.233", GDI_ROP_COPY); - gdiDrawTextEx(161/4, 55, "STM32F3 DISCOVERY", GDI_ROP_COPY); - gdiDrawTextEx(157/4, 70, "RECTANGLE DEMO", GDI_ROP_COPY); + gdiDrawTextEx(40, 55, "STM32F3 Discovery", GDI_ROP_COPY); + gdiDrawTextEx(40, 70, "Rectangle Demo", GDI_ROP_COPY); vidNextBuffer(); sysDelayMs(300); srand(sysTicks); - for (i = 0; i < 1000; i++) { + for (i = 0; i < 8000; i++) { // sysDelayMs(50); x = rand(); x = x % (VID_PIXELS_X - 1); y = rand(); y = y % VID_VSIZE - 1; @@ -157,9 +151,8 @@ vidClearScreen(); gdiRectangle(0,0,(VID_PIXELS_X - 1),VID_VSIZE - 1,0); - gdiDrawTextEx(180/4, 40, "MASSEY 159.233", GDI_ROP_COPY); - gdiDrawTextEx(161/4, 55, "STM32F3 DISCOVERY", GDI_ROP_COPY); - gdiDrawTextEx(165/4, 70, "CIRCLE DEMO", GDI_ROP_COPY); + gdiDrawTextEx(40, 55, "STM32F3 Discovery", GDI_ROP_COPY); + gdiDrawTextEx(40, 70, "Circle Demo", GDI_ROP_COPY); vidNextBuffer(); sysDelayMs(300); srand(sysTicks); @@ -179,9 +172,8 @@ vidClearScreen(); gdiRectangle(0,0,(VID_PIXELS_X - 1),VID_VSIZE - 1,0); - gdiDrawTextEx(180/4, 40, "MASSEY 159.233", GDI_ROP_COPY); - gdiDrawTextEx(161/4, 55, "STM32F3 DISCOVERY", GDI_ROP_COPY); - gdiDrawTextEx(165/4, 70, "BITMAP DEMO", GDI_ROP_COPY); + gdiDrawTextEx(40, 55, "STM32F3 Discovery", GDI_ROP_COPY); + gdiDrawTextEx(40, 70, "Bitmap Demo", GDI_ROP_COPY); vidNextBuffer(); sysDelayMs(300); @@ -225,8 +217,8 @@ } sysDelayMs(300); - conway_demo(); - } + //conway_demo(); + //} }