##// END OF EJS Templates
Sync
Sync

File last commit:

r78:230ad3b6f43f dev_alexis
r99:3b41c9708f77 dev_alexis
Show More
main.c
41 lines | 863 B | 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 <spi.h>
#include <gpio.h>
#include <fat32.h>
#include <mbr.h>
#include <libucfs.h>
#include <sdcard.h>
SD card Library started, SDCARD init and detection OK
r11
Changed entry point from main to libuc_main, added hello world example.
r78 int libuc_main()
SD card Library started, SDCARD init and detection OK
r11 {
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18 blkdevice dev;
dikpartition part;
ucdirent dirent;
FAT32fs fs;
sdcardDev sdcard;
//sdcardmake(sdcardDev* sdcard,UHANDLE phy,void (*rcvr_mmc) (UHANDLE,char *,uint32_t),void (*xmit_mmc) (UHANDLE,const char *,uint32_t ),void (*setspeed) (UHANDLE phy,uint32_t speed),uint32_t (*getspeed) (UHANDLE phy))
//sdcardmakeblkdev(&dev);
SD card Library started, SDCARD init and detection OK
r11
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18 // mbropen(&dev,&part,1);
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
sync
r25 spi_t spi = spiopenandconfig(spi2,spi8bits | spimaster |spiclkinhlow | spiclkfirstedge | spimsbfirst,10000,PB15,PB14,PB13,-1);
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18 while(1)
{
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
sync
r25 spiputw(spi,0x15);
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18 for(volatile int i=0;i<1024*1024;i++);
}
printf("Hello world from project 'SDCARD'! %f\n\r",2.986*4.565);
return 0;
SD card Library started, SDCARD init and detection OK
r11 }
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18