##// END OF EJS Templates
Sync, Still trying to solve 8bits ILI9328 read problems.
Sync, Still trying to solve 8bits ILI9328 read problems.

File last commit:

r66:3ad48bdbe9e3 dev_alexis
r67:604c231d911c dev_alexis
Show More
main.c
71 lines | 1.4 KiB | text/x-c | CLexer
#include <stdio.h>
#include <fat32.h>
#include <gpio.h>
#include <uart.h>
#include <bsp.h>
#include <core.h>
#include <bsp.h>
#include <spi.h>
#include <fat32.h>
#include <ucdirent.h>
#include <string.h>
#include <unistd.h>
#include <terminal.h>
#include <stdarg.h>
#include <malloc.h>
extern streamdevice* __opnfiles__[];
extern void test_Block_Move(LCD_t* LCD,int x,int y,int w,int h,int color);
char buffer[512];
void streamdevicePrint(streamdevice* dev, const char* format,...)
{
char** str_buffer;
int i;
va_list ap;
va_start(ap,format);
vasprintf(str_buffer,format,ap);
va_end(ap);
i=strlen(*str_buffer);
dev->ops->write(dev,(void*)*str_buffer,1,i);
free(*str_buffer);
}
//int printf(const char *format,...)
//{
// char** str_buffer;
// int i;
// va_list ap;
// va_start(ap,format);
// vasprintf(str_buffer,format,ap);
// va_end(ap);
// i=strlen(*str_buffer);
// __opnfiles__[1]->ops->write(__opnfiles__[1],(void*)*str_buffer,1,i);
// free(*str_buffer);
//}
void lcd_print()
{
lcd0.paintFilRect(&lcd0,10,10,100,100,0,0,0x0F0F);
// __opnfiles__[1]->ops->write(__opnfiles__[1],(void*)"hello",1,5);
}
int libuc_main()
{
char in[255];
lcd_print();
printf("hello world\n");
streamdevicePrint(__opnfiles__[1],"test Hello %d %f \n",1234567,8.96);
lcd0.paintText(&lcd0,"A",10,100,&ComicSansMS_18,0x0);
// while (scanf("%c",in))
// {
sleep(5);
// }
}