Merge pull request #3569 from leptun/fix_card_removed

Fix "Card removed" on startup
This commit is contained in:
DRracer 2022-08-24 19:17:24 +02:00 committed by GitHub
commit 2e677ea3ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7916,6 +7916,7 @@ void ultralcd_init()
#if defined (SDSUPPORT) && defined(SDCARDDETECT) && (SDCARDDETECT > 0) #if defined (SDSUPPORT) && defined(SDCARDDETECT) && (SDCARDDETECT > 0)
SET_INPUT(SDCARDDETECT); SET_INPUT(SDCARDDETECT);
WRITE(SDCARDDETECT, HIGH); WRITE(SDCARDDETECT, HIGH);
_delay_ms(1); //wait for the pullups to raise the line
lcd_oldcardstatus = IS_SD_INSERTED; lcd_oldcardstatus = IS_SD_INSERTED;
#endif//(SDCARDDETECT > 0) #endif//(SDCARDDETECT > 0)
lcd_encoder_diff = 0; lcd_encoder_diff = 0;