main.c
42 lines
| 866 B
| text/x-c
|
CLexer
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
|
r18 | #include <stdio.h> | ||
#include <spi.h> | ||||
#include <gpio.h> | ||||
#include <fat32.h> | ||||
#include <mbr.h> | ||||
#include <libucfs.h> | ||||
#include <sdcard.h> | ||||
r11 | ||||
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
|
r18 | int main() | ||
r11 | { | |||
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
|
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); | ||||
r11 | ||||
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
|
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; | ||||
r11 | } | |||
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
|
r18 | |||