##// END OF EJS Templates
Added graphical terminal (first shot).
Added graphical terminal (first shot).

File last commit:

r50:144bdeadc77a dev_alexis
r50:144bdeadc77a dev_alexis
Show More
main.c
93 lines | 2.1 KiB | text/x-c | CLexer
New version totaly integrated to Qt through custom sdk build!...
r47 #include <stdio.h>
#include <fat32.h>
#include <gpio.h>
#include <uart.h>
#include <stm32f4xx.h>
#include <math.h>
#include <bsp.h>
#include <i2c.h>
#include <CS43L22.h>
#include <ina226.h>
#include <fonts.h>
#include <stdlib.h>
#include <core.h>
Added graphical terminal (first shot).
r50 #include <terminal.h>
New version totaly integrated to Qt through custom sdk build!...
r47
extern streamdevice* __opnfiles__[];
#define LCD_COLOR_WHITE 0xFFFF
#define LCD_COLOR_BLACK 0x0000
#define LCD_COLOR_GREY 0xF7DE
#define LCD_COLOR_BLUE 0x001F
#define LCD_COLOR_BLUE2 0x051F
#define LCD_COLOR_RED 0xF800
#define LCD_COLOR_MAGENTA 0xF81F
#define LCD_COLOR_GREEN 0x07E0
#define LCD_COLOR_CYAN 0x7FFF
#define LCD_COLOR_YELLOW 0xFFE0
Finished mid-point circle algorithm for ili9328 controler
r48
New version totaly integrated to Qt through custom sdk build!...
r47 void monkDemo()
{
Finished mid-point circle algorithm for ili9328 controler
r48 //while(1)
New version totaly integrated to Qt through custom sdk build!...
r47 {
lcd0.paintText(&lcd0," ",10,Monk_24.Height+10,&Monk_24,LCD_COLOR_BLACK);
lcd0.paintText(&lcd0," ",230-Monk_24.Width,310,&Monk_24,LCD_COLOR_BLUE);
Finished mid-point circle algorithm for ili9328 controler
r48 //for(volatile int i=0;i<(1024*1024*16);i++);
//lcd0.paintFilRect(&lcd0,0,0,240,320,LCD_COLOR_WHITE,1,LCD_COLOR_WHITE);
//for(volatile int i=0;i<(1024*1024*4);i++);
New version totaly integrated to Qt through custom sdk build!...
r47 }
}
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());
Finished mid-point circle algorithm for ili9328 controler
r48 ili9328paintFilCirc(&lcd0,x,y,r,rand(),t,rand());
New version totaly integrated to Qt through custom sdk build!...
r47 }
int main()
{
Finished mid-point circle algorithm for ili9328 controler
r48 uint16_t innerbuffer[16];
uint16_t outterbuffer[16];
for(int i=0;i<16;i++)innerbuffer[i]=LCD_COLOR_BLUE;
for(int i=0;i<16;i++)outterbuffer[i]=LCD_COLOR_RED;
ili9328paintFilRect(&lcd0,0,0,240,320,LCD_COLOR_CYAN,5,LCD_COLOR_WHITE);
ili9328paintFilCirc(&lcd0,100,150,40,LCD_COLOR_RED,5,LCD_COLOR_BLUE);
ili9328paintFilCirc(&lcd0,120,160,120,LCD_COLOR_RED,1,LCD_COLOR_BLUE);
//ili9328paintFilCirc(&lcd0,150,240,80,LCD_COLOR_RED,2,LCD_COLOR_BLUE);
Added graphical terminal (first shot).
r50 monkDemo();
New version totaly integrated to Qt through custom sdk build!...
r47 while(1)
{
delay_100us(5000);
gpioset(LED1);
gpioclr(LED2);
delay_100us(5000);
gpioclr(LED1);
gpioset(LED2);
}
printf("hello world\n\r");
return 0;
}