MCPcopy Create free account
hub / github.com/MarlinFirmware/Marlin / init

Method init

Marlin/src/sd/cardreader.cpp:524–533  ·  view source on GitHub ↗

Provide a little time for drives to prepare

Source from the content-addressed store, hash-verified

522
523// Provide a little time for drives to prepare
524void CardReader::init() {
525 #if HAS_USB_FLASH_DRIVE
526 for (uint8_t i = 10; --i;) {
527 media_driver_usbFlash.idle();
528 hal.watchdog_refresh();
529 if (media_driver_usbFlash.isInserted()) break;
530 delay(20);
531 }
532 #endif
533}
534
535/**
536 * Handle media insertion and removal events

Callers 2

mountMethod · 0.45
removeJobRecoveryFileMethod · 0.45

Calls 4

delayFunction · 0.85
idleMethod · 0.45
watchdog_refreshMethod · 0.45
isInsertedMethod · 0.45

Tested by

no test coverage detected