SD basic example for DISCO-F769NI
Dependencies: BSP_DISCO_F769NI
Diff: main.cpp
- Revision:
- 2:4c7f351406d3
- Parent:
- 0:b134be2534a3
--- a/main.cpp Wed Jun 07 11:44:37 2017 +0000 +++ b/main.cpp Fri Nov 15 17:23:50 2019 +0100 @@ -1,5 +1,4 @@ #include "mbed.h" -#include "stm32f769i_discovery.h" #include "stm32f769i_discovery_lcd.h" #include "stm32f769i_discovery_sd.h" @@ -33,7 +32,7 @@ SD_state = BSP_SD_Erase(0, (BLOCKSIZE * 50)); /* Wait until SD card is ready to use for new operation */ - while(BSP_SD_GetCardState() != SD_TRANSFER_OK) { + while (BSP_SD_GetCardState() != SD_TRANSFER_OK) { } if (SD_state != MSD_OK) { BSP_LCD_DisplayStringAt(20, 130, (uint8_t *)"SD ERASE : FAILED.", LEFT_MODE); @@ -46,7 +45,7 @@ while (1) { if (BSP_SD_IsDetected() != SD_PRESENT) { - if(prev_status != SD_NOT_PRESENT) { + if (prev_status != SD_NOT_PRESENT) { BSP_SD_Init(); prev_status = SD_NOT_PRESENT; BSP_LCD_SetTextColor(LCD_COLOR_RED); @@ -54,7 +53,7 @@ } } else if (prev_status != SD_PRESENT) { BSP_LCD_SetTextColor(LCD_COLOR_GREEN); - BSP_LCD_DisplayStringAt(20, BSP_LCD_GetYSize() - 30, (uint8_t *)"SD Connected ", LEFT_MODE); + BSP_LCD_DisplayStringAt(20, BSP_LCD_GetYSize() - 30, (uint8_t *)"SD Connected ", LEFT_MODE); prev_status = SD_PRESENT; }