MCPcopy Create free account
hub / github.com/SmingHub/Sming / select

Function select

Sming/Libraries/SDCard/SDCard.cpp:176–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174/*-----------------------------------------------------------------------*/
175
176bool select() /* 1:OK, 0:Timeout */
177{
178 digitalWrite(chipSelect, LOW);
179 SDCardSPI->transfer(0xff); /* Dummy clock (force DO enabled) */
180 if(wait_ready()) {
181 return true;
182 }
183
184 debug_e("SDCard select() failed");
185 deselect();
186 return false;
187}
188
189/*-----------------------------------------------------------------------*/
190/* Receive a data packet from the card */

Callers 3

waitMethod · 0.85
send_cmdFunction · 0.85
disk_ioctlFunction · 0.85

Calls 4

wait_readyFunction · 0.85
deselectFunction · 0.85
digitalWriteFunction · 0.50
transferMethod · 0.45

Tested by

no test coverage detected