##// END OF EJS Templates
sync
sync

File last commit:

r18:bd9ab647f70a default
r23:4b077f397f1c default
Show More
main.c
42 lines | 866 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
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18 int 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);
spi_t spi1;
spiopenandconfig(1,&spi1,spi8bits | spimaster |spiclkinhlow | spiclkfirstedge | spimsbfirst,10000,PB15,PB14,PB13,-1);
while(1)
{
spiputw(&spi1,0x15);
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