MCPcopy Create free account
hub / github.com/BruceDevices/firmware / ToggleSDCard

Function ToggleSDCard

src/core/sd_functions.cpp:120–129  ·  view source on GitHub ↗

** Function name: ToggleSDCard ** Description: Turn Off or On the SDCard, return sdcardMounted state ***************************************************************************************/

Source from the content-addressed store, hash-verified

118** Description: Turn Off or On the SDCard, return sdcardMounted state
119***************************************************************************************/
120bool ToggleSDCard() {
121 if (sdcardMounted == true) {
122 closeSdCard();
123 sdcardMounted = false;
124 return false;
125 } else {
126 sdcardMounted = setupSdCard();
127 return sdcardMounted;
128 }
129}
130/***************************************************************************************
131** Function name: deleteFromSd
132** Description: delete file or folder

Callers

nothing calls this directly

Calls 2

closeSdCardFunction · 0.85
setupSdCardFunction · 0.85

Tested by

no test coverage detected