Cosmetics

This commit is contained in:
Bertrand Songis
2016-07-24 11:31:47 +02:00
parent e25db7e9e0
commit ab6c6babae
8 changed files with 23 additions and 47 deletions
+2 -2
View File
@@ -25,8 +25,8 @@
/*-----------------------------------------------------------------------*/
#include "diskio.h"
#include <string.h> // memcpy
#include "../../opentx.h"
#include <string.h>
#include "opentx.h"
#include "sdio_sd.h"
#define BLOCK_SIZE 512 /* Block Size in Bytes */
+7 -15
View File
@@ -18,9 +18,7 @@
* GNU General Public License for more details.
*/
/* Includes ------------------------------------------------------------------*/
#include "../horus/sdio_sd.h"
#include "sdio_sd.h"
#include "../../debug.h"
/** @addtogroup Utilities
@@ -1152,12 +1150,10 @@ OPTIMIZE("O0") SD_Error SD_ReadBlock(uint8_t *readbuff, uint32_t ReadAddr, uint1
SD_LowLevel_DMA_RxConfig((uint32_t *)readbuff, BlockSize);
#endif
if (CardType == SDIO_HIGH_CAPACITY_SD_CARD) {
if (CardType == SDIO_HIGH_CAPACITY_SD_CARD)
BlockSize = 512;
}
else {
else
ReadAddr *= 512;
}
/* Set Block Size for Card */
SDIO_CmdInitStructure.SDIO_Argument = (uint32_t) BlockSize;
@@ -1281,12 +1277,10 @@ OPTIMIZE("O0") SD_Error SD_ReadMultiBlocks(uint8_t *readbuff, uint32_t ReadAddr,
SD_LowLevel_DMA_RxConfig((uint32_t *)readbuff, (NumberOfBlocks * BlockSize));
SDIO_DMACmd(ENABLE);
if (CardType == SDIO_HIGH_CAPACITY_SD_CARD) {
if (CardType == SDIO_HIGH_CAPACITY_SD_CARD)
BlockSize = 512;
}
else {
else
ReadAddr *= 512;
}
/*!< Set Block Size for Card */
SDIO_CmdInitStructure.SDIO_Argument = (uint32_t) BlockSize;
@@ -1417,12 +1411,10 @@ OPTIMIZE("O0") SD_Error SD_WriteBlock(uint8_t *writebuff, uint32_t WriteAddr, ui
SDIO_DMACmd(ENABLE);
#endif
if (CardType == SDIO_HIGH_CAPACITY_SD_CARD) {
if (CardType == SDIO_HIGH_CAPACITY_SD_CARD)
BlockSize = 512;
}
else {
else
WriteAddr *= 512;
}
/* Set Block Size for Card */
SDIO_CmdInitStructure.SDIO_Argument = (uint32_t) BlockSize;