##// END OF EJS Templates
Sync
Sync

File last commit:

r78:230ad3b6f43f dev_alexis
r99:3b41c9708f77 dev_alexis
Show More
main.c
230 lines | 5.5 KiB | text/x-c | CLexer
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18 #include <stdio.h>
#include <fat32.h>
#include <gpio.h>
#include <uart.h>
#include <stm32f4xx.h>
jeandet@PC-DE-JEANDET.lab-lpp.local
sync
r21 #include <bsp.h>
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Sync
r42 #include <core.h>
Added Oplayer BSP, Fixed bug on GPIO library(gpiosetval change all the port...
r60 #include <VS10XX.h>
#include <bsp.h>
Fixed some issues on SCARD driver!
r61 #include <spi.h>
#include <sdcard.h>
#include <sdcard-spi.h>
#include <fat32.h>
#include <ucdirent.h>
#include <string.h>
Fat32 library partially working, can read a file.
r62 #include <terminal.h>
Added Simulator target to run code on x86 and debug functions....
r63 #include <ili9328.h>
Fixed some issues on SCARD driver!
r61
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18
extern streamdevice* __opnfiles__[];
Added Simulator target to run code on x86 and debug functions....
r63 extern void test_Block_Move(LCD_t* LCD,int x,int y,int w,int h,int color);
Jeandet Alexis
Some bug fixed on ILI9328 driver, 16 bit mode working well, 8 bit mode still...
r66 extern void test_all_colors(LCD_t* LCD);
extern void test_small_lines(LCD_t* LCD);
Sync, Still trying to solve 8bits ILI9328 read problems.
r67 extern void test_lines(LCD_t* LCD);
extern void test_address(LCD_t* LCD);
Huge cleanup, removed "out of dir building" now libuc contains qmake and...
r71 extern void test_TC();
Jeandet Alexis
Some bug fixed on ILI9328 driver, 16 bit mode working well, 8 bit mode still...
r66 void test_uniform_rw(LCD_t* LCD);
Fat32 library partially working, can read a file.
r62 char buffer[512];
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18
Added Oplayer BSP, Fixed bug on GPIO library(gpiosetval change all the port...
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++);
}
Fat32 library partially working, can read a file.
r62
Added Simulator target to run code on x86 and debug functions....
r63 void randTextDemo()
{
int16_t x,y,w,h,t,r;
char buf[2];
buf[1]='\0';
x=rand()%240;
y=rand()%320;
if(x>y)
r=(rand()%(y))%(320-y);
else
r=(rand()%(x))%(240-x);
h=rand()%(320-y);
buf[0]=rand()%(255);
//ili9328paintFilRect(&lcd0,x,y,w,h,rand(),t,rand());
ili9328paintText(&lcd0,buf,x,y,&ComicSansMS_18,rand());
//ili9328paintFilCirc(&lcd0,x,y,r,rand(),t,rand());
delay_100us(5000);
//for(volatile int i=0;i<(1024*2);i++);
Fat32 library partially working, can read a file.
r62 }
Added Simulator target to run code on x86 and debug functions....
r63
Fat32 library partially working, can read a file.
r62 void tryToplay2()
{
extern blkdevice sdcard2blkdev;
int i=0,l=0;
spisetspeed(audioCodec0.SPIdev,4000000);
printf("Streaming File\n");
//printf("New LBA=0x%X\n",nextLba);
while(sdcard2blkdev.read(&sdcard2blkdev,buffer,l++,1)==RES_OK)
{
for(i=0;i<512;i+=32)
{
vs10XXstream32bytes(&audioCodec0,buffer+i);
}
}
}
Added Oplayer BSP, Fixed bug on GPIO library(gpiosetval change all the port...
r60
Added Simulator target to run code on x86 and debug functions....
r63 void playFile(ucdirent* file,FAT32fs* part)
{
extern volatile vs10XXDev audioCodec0;
Removed error on fat32 library, seems now to be able navigate among sectors in...
r68 char direntName[]=" \n";
Added Simulator target to run code on x86 and debug functions....
r63 uint32_t fileLba,nextLba;
int i=0;
fat32getdirentname(file,direntName);
More buid system cleaning....
r65 //gpioset(LCD_BACKL);
printf("%s\n",direntName);
Added Simulator target to run code on x86 and debug functions....
r63 nextLba=fat32getdirentlba(file);
//printf("Streaming File\n");
More buid system cleaning....
r65 //gpioclr(LCD_BACKL);
Added Simulator target to run code on x86 and debug functions....
r63 do
{
fileLba = nextLba;
if(sdcard2FAT32part1.part->phy->read(part->part->phy,buffer,fileLba,1)==RES_OK)
{
for(i=0;i<512;i+=32)
{
vs10XXstream32bytes(&audioCodec0,buffer+i);
}
}
}while ((fat32nextsectorlba(part,fileLba,&nextLba)==DIRENT_noErr) && (!gpiogetval(BP3)));
vs10XXsoftReset(&audioCodec0);
while (gpiogetval(BP3))delay_100us(1000);
}
void playAllparts()
{
extern FAT32fs sdcard2FAT32part1,sdcard2FAT32part2,sdcard2FAT32part3,sdcard2FAT32part4;
ucdirent root;
if(DIRENT_noErr==fat32mkdirent(&sdcard2FAT32part1,&root))
{
printf("Reading on SDCARD2 part1\n");
if(DIRENT_noErr==fat32getrootfirstent(&root))
{
do{
playFile(&root,&sdcard2FAT32part1);
}while (DIRENT_noErr==fat32nextdirent(&root));
}
}
gpioset(LED2);
if(DIRENT_noErr==fat32mkdirent(&sdcard2FAT32part2,&root))
{
printf("Reading on SDCARD2 part2\n");
if(DIRENT_noErr==fat32getrootfirstent(&root))
{
do{
playFile(&root,&sdcard2FAT32part2);
}while (DIRENT_noErr==fat32nextdirent(&root));
}
}
}
Huge cleanup, removed "out of dir building" now libuc contains qmake and...
r71 int main1()
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18 {
Jeandet Alexis
sync
r64 delay_100us(30000);
Added Simulator target to run code on x86 and debug functions....
r63 int i=0;
int color=0;
Sync, Still trying to solve 8bits ILI9328 read problems.
r67 // test_all_colors(&lcd0);
// test_small_lines(&lcd0);
// test_uniform_rw(&lcd0);
Jeandet Alexis
Some bug fixed on ILI9328 driver, 16 bit mode working well, 8 bit mode still...
r66
printf("LCD ID REG = 0x%X\n\r",lcd0.interface->readreg(ILI9328_REGISTER_DRIVERCODEREAD));
Sync, Still trying to solve 8bits ILI9328 read problems.
r67 printf("LCD ENTRY MODE REG = 0x%X\n\r",lcd0.interface->readreg(ILI9328_REGISTER_ENTRYMODE));
uint16_t test[16];
for(int i=0;i<16;i++)
{
test[i]=0xF00F;
}
lcd0.paint(&lcd0,test,10,100,4,4);
lcd0.getPix(&lcd0,test,10,100,4,4);
for(int i=0;i<16;i++)
{
printf("@%d=0x%X\n",i,test[i]);
}
// test_lines(&lcd0);
Huge cleanup, removed "out of dir building" now libuc contains qmake and...
r71 test_TC();
Sync, Still trying to solve 8bits ILI9328 read problems.
r67 while(1)test_address(&lcd0);
Added Simulator target to run code on x86 and debug functions....
r63 for(i=0;i<240;i++)
{
if(i>(240/3))
{
color= (i<<5) + 0x1F;
}
else
{
color = i;
}
if(i>(2*240/3))
{
color= (i<<10) + 0x3FF;
}
lcd0.paintFilRect(&lcd0,i,0,1,100,0,0,color);
}
while(1)printf("test ");
// for(i=0;i<240;i++)
// {
// if(i>(240/3))
// {
// color= (i<<5) + 0x1F;
// }
// else
// {
// color = i;
// }
// if(i>(2*240/3))
// {
// color= (i<<10) + 0x3FF;
// }
// lcd0.paintFilRect(&lcd0,i,220,1,100,0,0,color);
// }
for(i=0;i<240;i++)
{
ili9328setFrame(&lcd0,i,0,1,100);
lcd0.interface->readGRAM(buffer,100);
lcd0.paint(&lcd0,buffer,i,200,1,100);
}
while(1);
}
Changed entry point from main to libuc_main, added hello world example.
r78 int libuc_main()
Added Simulator target to run code on x86 and debug functions....
r63 {
Fat32 library partially working, can read a file.
r62 extern terminal_t terminal0;
extern volatile vs10XXDev audioCodec0;
printf("Volume=0x%x\n",vs10XXcmdread(&audioCodec0,VSVOL));
vs10XXcmdwrite(&audioCodec0,VSCLOCKF,0x2000);
Added Simulator target to run code on x86 and debug functions....
r63 delay_100us(1000);
Huge cleanup, removed "out of dir building" now libuc contains qmake and...
r71 //vs10XXcmdwrite(&audioCodec0,VSVOL,0x2020);
Fat32 library partially working, can read a file.
r62 printf("VSCLOCKF=0x%x\n",vs10XXcmdread(&audioCodec0,VSCLOCKF));
printf("VSMODE=0x%x\n",vs10XXcmdread(&audioCodec0,VSMODE));
Added Simulator target to run code on x86 and debug functions....
r63 //terminal_clear(&terminal0);
More buid system cleaning....
r65 // gpioclr(LCD_BACKL);
Added Simulator target to run code on x86 and debug functions....
r63 playAllparts();
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18 return 0;
}