diff --git a/bsp/lpc176x/drivers/sd.c b/bsp/lpc176x/drivers/sd.c index 3619f84172..61e34ba43a 100644 --- a/bsp/lpc176x/drivers/sd.c +++ b/bsp/lpc176x/drivers/sd.c @@ -32,7 +32,7 @@ static uint8_t LPC17xx_SD_SendCmd(uint8_t cmd, uint32_t arg); static bool LPC17xx_SD_ReadSector(uint32_t sector, uint8_t *buff, uint32_t count); static bool LPC17xx_SD_ReadDataBlock(uint8_t *buff, uint32_t cnt); static bool LPC17xx_SD_WriteSector(uint32_t sector, const uint8_t *buff, uint32_t count); -static bool LPC17xx_SD_WirteDataBlock(const uint8_t *buff, uint8_t token); +static bool LPC17xx_SD_WriteDataBlock(const uint8_t *buff, uint8_t token); static bool LPC17xx_SD_ReadCfg(SDCFG *cfg); static bool LPC17xx_SD_WaitForReady(void); @@ -279,7 +279,7 @@ static bool LPC17xx_SD_WriteSector(uint32_t sector, const uint8_t *buff, uint32_ if (count == 1) /* Single block write */ { if ((LPC17xx_SD_SendCmd(WRITE_BLOCK, sector) == 0) - && LPC17xx_SD_WirteDataBlock(buff, TOKEN_SINGLE_BLOCK)) + && LPC17xx_SD_WriteDataBlock(buff, TOKEN_SINGLE_BLOCK)) count = 0; } else /* Multiple block write */ @@ -289,12 +289,12 @@ static bool LPC17xx_SD_WriteSector(uint32_t sector, const uint8_t *buff, uint32_ { do { - if (!LPC17xx_SD_WirteDataBlock(buff, TOKEN_MULTI_BLOCK)) break; + if (!LPC17xx_SD_WriteDataBlock(buff, TOKEN_MULTI_BLOCK)) break; buff += 512; } while (--count); #if 1 - if (!LPC17xx_SD_WirteDataBlock(0, TOKEN_STOP_TRAN)) /* STOP_TRAN token */ + if (!LPC17xx_SD_WriteDataBlock(0, TOKEN_STOP_TRAN)) /* STOP_TRAN token */ count = 1; #else LPC17xx_SPI_SendByte(TOKEN_STOP_TRAN); @@ -312,7 +312,7 @@ static bool LPC17xx_SD_WriteSector(uint32_t sector, const uint8_t *buff, uint32_ 0xFC -> multi block 0xFD -> Stop *****************************************************************************/ -static bool LPC17xx_SD_WirteDataBlock(const uint8_t *buff, uint8_t token) +static bool LPC17xx_SD_WriteDataBlock(const uint8_t *buff, uint8_t token) { uint8_t resp, i;