##// END OF EJS Templates
More buid system cleaning....
More buid system cleaning. Terminal widget almost working. Need to debug 8bit acces on ILI9328.

File last commit:

r65:d4bc0ad7470d dev_alexis
r65:d4bc0ad7470d dev_alexis
Show More
main.c
204 lines | 4.7 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);
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;
char direntName[]=" \n";
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));
}
}
}
More buid system cleaning....
r65 int main2()
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;
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);
}
More buid system cleaning....
r65 int 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);
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;
}