mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-10-17 02:31:31 +08:00
code formating
This commit is contained in:
parent
5d018cfbf6
commit
a27045080f
@ -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 ) {
|
||||||
|
@ -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 ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user