What changed, and why it matters
This commit is a minor performance tweak to the function that checks whether an SD card is inserted. It reduces the wait time between status checks from 100 milliseconds to 5 milliseconds, while increasing the number of checks so the total maximum wait remains about one second. There is no security-relevant change here.
No security action needed. Treat as a normal performance improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In sd_card_inserted(), the polling loop for SD_MMC_INIT_ONGOING was changed from 10 iterations of 100 ms delays to 200 iterations of 5 ms delays. The total timeout budget stays roughly the same (~1 s), but the polling granularity is finer. This is purely a responsiveness/speedup change with no observable security signal in the diff or commit metadata.
Changed components
src/sd.cInspect captured patch +2 / −2
diff --git a/src/sd.c b/src/sd.c
index 8d0462a..98bf0d5 100644
--- a/src/sd.c
+++ b/src/sd.c
@@ -317,8 +317,8 @@ bool sd_card_inserted(void)
sd_mmc_err_t err = sd_mmc_check(0);
/* If initialization is ongoing, wait up to 1 second for it to initialize */
if (err == SD_MMC_INIT_ONGOING) {
- for (int i = 0; i < 10; ++i) {
- delay_ms(100);
+ for (int i = 0; i < 200; ++i) {
+ delay_ms(5);
err = sd_mmc_check(0);
if (err != SD_MMC_INIT_ONGOING) {
break;
Why this scored 12/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.