code formating

This commit is contained in:
Luc 2019-10-26 09:31:07 +02:00
parent 5d018cfbf6
commit a27045080f
4 changed files with 6 additions and 10 deletions

View File

@ -87,9 +87,7 @@ uint8_t ESP_SD::getState(bool refresh)
return _state; //to avoid refresh=true + busy to reset SD and waste time return _state; //to avoid refresh=true + busy to reset SD and waste time
} }
//SD is idle or not detected, let see if still the case //SD is idle or not detected, let see if still the case
_state = ESP_SDCARD_NOT_PRESENT; _state = ESP_SDCARD_NOT_PRESENT;
//using default value for speed ? should be parameter
//refresh content if card was removed //refresh content if card was removed
if (SD.begin((ESP_SD_CS_PIN == -1)?SS:ESP_SD_CS_PIN, SD_SCK_HZ(F_CPU/_spi_speed_divider))) { if (SD.begin((ESP_SD_CS_PIN == -1)?SS:ESP_SD_CS_PIN, SD_SCK_HZ(F_CPU/_spi_speed_divider))) {
if (SD.card()->cardSize() > 0 ) { if (SD.card()->cardSize() > 0 ) {

View File

@ -86,9 +86,7 @@ uint8_t ESP_SD::getState(bool refresh)
return _state; //to avoid refresh=true + busy to reset SD and waste time return _state; //to avoid refresh=true + busy to reset SD and waste time
} }
//SD is idle or not detected, let see if still the case //SD is idle or not detected, let see if still the case
_state = ESP_SDCARD_NOT_PRESENT; _state = ESP_SDCARD_NOT_PRESENT;
//using default value for speed ? should be parameter
//refresh content if card was removed //refresh content if card was removed
if (SD.begin((ESP_SD_CS_PIN == -1)?SS:ESP_SD_CS_PIN, SD_SCK_MHZ(FREQMZ/_spi_speed_divider))) { if (SD.begin((ESP_SD_CS_PIN == -1)?SS:ESP_SD_CS_PIN, SD_SCK_MHZ(FREQMZ/_spi_speed_divider))) {
if (SD.card()->cardSize() > 0 ) { if (SD.card()->cardSize() > 0 ) {