X-Git-Url: http://cloudbase.mooo.com/gitweb/avrcpm.git/blobdiff_plain/678fc0b01b6a5e7ebb30388383ce2bea0d30303a..637689dec534184006a1d30b8b49f998062442ce:/avrcpm/avr/mmc.asm diff --git a/avrcpm/avr/mmc.asm b/avrcpm/avr/mmc.asm index e3d75eb..f43af1c 100644 --- a/avrcpm/avr/mmc.asm +++ b/avrcpm/avr/mmc.asm @@ -591,16 +591,16 @@ mmc_rdex: .endif ret - + ;-------------------------------------------------------------- -; Read word -; TODO: Read Word to ZL,ZH at given ZL/ZH Offset -; Need for reading of single FAT16 Entrys without killing the -; Entrys in hostbuffer... +; Read word +; TODO: Read Word to ZL,ZH at given ZL/ZH Offset +; Need for reading of single FAT16 Entrys without killing the +; Entrys in hostbuffer... ; ; in zh,zl: Pointer to Word within the Sector to read ; in yh..xl: Start sector number (LBA) -; out zh,zl : word thats been read +; out zh,zl : word thats been read mmcReadWord: .if MMC_DEBUG > 1 @@ -616,7 +616,7 @@ mmcReadWord: lds temp,mmcCardType sbrs temp,log2(CT_BLOCK) rcall mul_yx_512 ;Convert to byte address (*512) - + ldi temp2,CMD17 rcall mmcCmd ldi temp2,RES_ERROR @@ -644,30 +644,30 @@ mmc_rcvw_start: mmc_rcvw_rl: sbiw yl,1 breq mmc_rcvw_rle - cp zl,_0 - cpc zh,_0 - breq mmc_rcvw_sto - - sbiw zl,1 + cp zl,_0 + cpc zh,_0 + breq mmc_rcvw_sto + + sbiw zl,1 spi_waitm in temp,SPDR out SPDR,_255 rjmp mmc_rcvw_rl -mmc_rcvw_sto: - mov zl,temp +mmc_rcvw_sto: + mov zl,temp spi_waitm in temp,SPDR out SPDR,_255 - mov zh,temp - + mov zh,temp + mmc_rcvw_rl2: sbiw yl,1 breq mmc_rcvw_rle spi_waitm in temp,SPDR out SPDR,_255 - rjmp mmc_rcvw_rl2 + rjmp mmc_rcvw_rl2 mmc_rcvw_rle: rcall spi_wait ; while SPI module shifts in crc part1. rcall spi_rcvr ;Read second crc. @@ -682,7 +682,7 @@ mmc_rdexw: rcall printhex printstring " " .endif - ret + ret ;-------------------------------------------------------------- ; Write sector