[Efsl-cvs] efsl-0.3/examples/avr avrtest.c,1.3,1.4
Brought to you by:
flecxie,
lennartyseboodt
From: Michael De N. <fl...@us...> - 2005-11-22 21:23:16
|
Update of /cvsroot/efsl/efsl-0.3/examples/avr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4730/examples/avr Modified Files: avrtest.c Log Message: Renamed some efsl-functions (all starting with EFSL_) ---------------------------------------------------------------------- Index: avrtest.c =================================================================== RCS file: /cvsroot/efsl/efsl-0.3/examples/avr/avrtest.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** avrtest.c 24 Oct 2005 18:43:20 -0000 1.3 --- avrtest.c 22 Nov 2005 21:23:03 -0000 1.4 *************** *** 1,18 **** #include <efs.h> #include <sd.h> #include <atmega_spi.h> void hang(void); void main(void) { ! EFSL_Storage_Config sconf; ! EFSL_Filesystem_Config fconf; ! EFSL_Storage storage; ! EFSL_Filesystem filesystem; File file_r; ! atmegaSpiInterface asi; ! SdSpiProtocol ssp; char buf[512]; --- 1,23 ---- + /*****************************************************************************/ #include <efs.h> #include <sd.h> #include <atmega_spi.h> + /*****************************************************************************/ + /*****************************************************************************/ void hang(void); + /*****************************************************************************/ void main(void) { ! efsl_storage_conf storage_conf; ! efsl_fs_conf fs_conf; ! ! efsl_storage storage; ! efsl_fs fs; File file_r; ! atmegaSpiInterface spi_interface; ! SdSpiProtocol sd_protocol; char buf[512]; *************** *** 24,56 **** /* Init */ ! asi.pinSelect=0x01; ! ssp.spiHwInterface=&asi; ! ssp.spiHwInit=(void *)atmega_spi_init; ! ssp.spiSendByte=(void *)atmega_spi_send; ! sconf.hwObject=&ssp; ! sconf.if_init_fptr=(void *)sd_Init; ! sconf.if_read_fptr=(void *)sd_readSector; ! sconf.if_write_fptr=(void *)sd_writeSector; ! sconf.if_ioctl_fptr=(void *)sd_ioctl; ! sconf.ioman_bufmem=0; ! fconf.no_partitions=0; ! fconf.storage=&storage; DBG((TXT("Let's go...\n"))); ! if(EFSL_Storage_Init(&storage,&sconf)){ DBG((TXT("Error initializing storage: %d"))); hang(); } ! if(EFSL_Filesystem_Init(&filesystem,&fconf)){ DBG((TXT("Unable to mount fs"))); hang(); } ! if(file_fopen(&file_r,&filesystem.filesystem,"orig.txt",'r')!=0){ DBG((TXT("Could not open file\n"))); hang(); --- 29,61 ---- /* Init */ ! spi_interface.pinSelect=0x01; ! sd_protocol.spiHwInterface=&spi_interface; ! sd_protocol.spiHwInit=(void *)atmega_spi_init; ! sd_protocol.spiSendByte=(void *)atmega_spi_send; ! storage_conf.hwObject=&sd_protocol; ! storage_conf.if_init_fptr=(void *)sd_Init; ! storage_conf.if_read_fptr=(void *)sd_readSector; ! storage_conf.if_write_fptr=(void *)sd_writeSector; ! storage_conf.if_ioctl_fptr=(void *)sd_ioctl; ! storage_conf.ioman_bufmem=0; ! fs_conf.no_partitions=0; ! fs_conf.storage=&storage; DBG((TXT("Let's go...\n"))); ! if(efsl_initStorage(&storage,&storage_conf)){ DBG((TXT("Error initializing storage: %d"))); hang(); } ! if(efsl_initFs(&fs,&fs_conf)){ DBG((TXT("Unable to mount fs"))); hang(); } ! if(file_fopen(&file_r,&fs.filesystem,"orig.txt",'r')!=0){ DBG((TXT("Could not open file\n"))); hang(); *************** *** 68,71 **** --- 73,77 ---- hang(); } + /*****************************************************************************/ void hang(void) *************** *** 74,75 **** --- 80,83 ---- _NOP(); } + /*****************************************************************************/ + |