From af1f8a20d4de5ed933589fdac6395ed26027a949 Mon Sep 17 00:00:00 2001 From: Ari Sundholm Date: Thu, 5 Nov 2020 18:59:22 +0200 Subject: [PATCH] ulibSD/sd_io.c: Fix line endings to be consistently CRLF. --- software/sys_controller/ulibSD/sd_io.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/software/sys_controller/ulibSD/sd_io.c b/software/sys_controller/ulibSD/sd_io.c index 6c33c42..73faf2f 100644 --- a/software/sys_controller/ulibSD/sd_io.c +++ b/software/sys_controller/ulibSD/sd_io.c @@ -32,7 +32,7 @@ DWORD __SD_Sectors (SD_DEV *dev) return (((DWORD)(ftell(dev->fp)))/((DWORD)512)-1); } } -#else // For use with uControllers +#else // For use with uControllers /****************************************************************************** Private Methods Prototypes - Direct work with SD card ******************************************************************************/ @@ -201,7 +201,7 @@ DWORD __SD_Sectors (SD_DEV *dev) BYTE READ_BL_LEN = 0; int timer_set; - if(__SD_Send_Cmd(CMD9, 0)==0) + if(__SD_Send_Cmd(CMD9, 0)==0) { // Wait for response timer_set = SPI_Timer_On(5); // Wait for data packet (timeout of 5ms) @@ -262,7 +262,7 @@ DWORD __SD_Sectors (SD_DEV *dev) SDRESULTS SD_Init(SD_DEV *dev) { BYTE initdata[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; -#if defined(_M_IX86) // x86 +#if defined(_M_IX86) // x86 dev->fp = fopen(dev->fn, "r+"); if (dev->fp == NULL) return (SD_ERROR); @@ -400,7 +400,7 @@ SDRESULTS SD_Read(SD_DEV *dev, void *dat, DWORD sector, WORD ofs, WORD cnt) } while((tkn==0xFF)&&(SPI_Timer_Status()==TRUE)); SPI_Timer_Off(); // Token of single block? - if(tkn==0xFE) { + if(tkn==0xFE) { // Size block (512 bytes) + CRC (2 bytes) - offset - bytes to count remaining = SD_BLK_SIZE + 2 - ofs - cnt; // Skip offset