main.c
54 lines
| 1.0 KiB
| text/x-c
|
CLexer
|
r18 | #include <stdio.h> | ||
#include <fat32.h> | ||||
#include <gpio.h> | ||||
#include <uart.h> | ||||
#include <stm32f4xx.h> | ||||
|
r21 | #include <bsp.h> | ||
|
r42 | #include <core.h> | ||
r60 | #include <VS10XX.h> | |||
#include <bsp.h> | ||||
|
r18 | |||
extern streamdevice* __opnfiles__[]; | ||||
r60 | void randBoxesDemo() | |||
{ | ||||
int16_t x,y,w,h,t,r; | ||||
x=rand()%240; | ||||
y=rand()%320; | ||||
w=rand()%(240-x); | ||||
if(x>y) | ||||
r=(rand()%(y))%(320-y); | ||||
else | ||||
r=(rand()%(x))%(240-x); | ||||
h=rand()%(320-y); | ||||
t=rand()%(10); | ||||
ili9328paintFilRect(&lcd0,x,y,w,h,rand(),t,rand()); | ||||
//ili9328paintFilCirc(&lcd0,x,y,r,rand(),t,rand()); | ||||
//delay_100us(10); | ||||
//for(volatile int i=0;i<(1024*2);i++); | ||||
} | ||||
|
r18 | int main() | ||
{ | ||||
r60 | while(1) | |||
|
r18 | { | ||
r60 | // printf("Audio Codec reg0=0x%x\n",vs10XXcmdread(&audioCodec0,0)); | |||
// printf("hello "); | ||||
// bsp_lcd0_write_reg(1,0x1234); | ||||
// delay_100us(10000); | ||||
// randBoxesDemo(); | ||||
gpioset(LED1); | ||||
r44 | delay_100us(10000); | |||
r60 | gpioclr(LED1); | |||
r44 | delay_100us(10000); | |||
r60 | ||||
|
r18 | } | ||
printf("hello world\n\r"); | ||||
return 0; | ||||
} | ||||