Task description
Current SD card driver is a quick rollout for setting up communication with SD card. The init_sd_card is long and does not return descriptive error codes. Read and write functions may loop forever waiting for correct response from an SD card.
Goal
Refactor SD card driver by reducing cognitive complexity of init_sd_card. Add descriptive error codes upon return. Add timeout for transactions on SD card.
Related Files
Additional Resources
A good tutorial for SD card drivers can be found here.
Task description
Current SD card driver is a quick rollout for setting up communication with SD card. The
init_sd_cardis long and does not return descriptive error codes. Read and write functions may loop forever waiting for correct response from an SD card.Goal
Refactor SD card driver by reducing cognitive complexity of
init_sd_card. Add descriptive error codes upon return. Add timeout for transactions on SD card.Related Files
src/drivers/sd_card.cAdditional Resources
A good tutorial for SD card drivers can be found here.