|
|
#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>
|
|
|
#include <terminal.h>
|
|
|
|
|
|
extern streamdevice* __opnfiles__[__MAX_OPENED_FILES__];
|
|
|
|
|
|
#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
|
|
|
|
|
|
extern int __lineCount__;
|
|
|
extern int __columnCount__;
|
|
|
|
|
|
int main()
|
|
|
{
|
|
|
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_BLACK);
|
|
|
|
|
|
streamdevice* terminal=__opnfiles__[1];
|
|
|
terminal_init(&lcd0,&ComicSansMS_18,terminal);
|
|
|
//terminal->write(terminal,"Hi",1, 2);
|
|
|
//lcd0.paintText(&lcd0,"Hello",10,50,&ComicSansMS_18,0xFF00);
|
|
|
// __opnfiles__[1]=terminal;
|
|
|
//__opnfiles__[0]=terminal;
|
|
|
int i=1;
|
|
|
//printf("hello World %d",i);
|
|
|
|
|
|
printf("Line cnt :\n \t%d\n",__lineCount__);
|
|
|
printf("Column cnt :\n \t%d\n",__columnCount__);
|
|
|
printf("CPU Freq :\n \t%dMHz\n",getCpuFreq()/1000000);
|
|
|
while(1)
|
|
|
{
|
|
|
i%=1000;
|
|
|
//terminal->write(&terminal," Hi",1, 2);
|
|
|
//delay_100us(1000);
|
|
|
gpioset(LED1);
|
|
|
//delay_100us(1000);
|
|
|
gpioclr(LED1);
|
|
|
}
|
|
|
printf("hello world\n\r");
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|