update msc sdcad example to work with metro rp2040 #530
+45
−39
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces improvements to SD card handling and code style consistency in two example files:
msc_external_flash_sdcard.ino
andmsc_sdfat.ino
. The changes include adding SD card configuration for theARDUINO_ADAFRUIT_METRO_RP2040
board, enhancing SD card initialization logic, and cleaning up code formatting for better readability.SD Card Configuration Updates:
SDCARD_CS
,SDCARD_DETECT
, andSDCARD_DETECT_ACTIVE
definitions for theARDUINO_ADAFRUIT_METRO_RP2040
board inmsc_external_flash_sdcard.ino
andmsc_sdfat.ino
, ensuring compatibility with this board. [1] [2]SD Card Initialization and Logic Improvements:
init_sdcard()
andsdcard_ready_callback()
to use the newSDCARD_DETECT_ACTIVE
macro, improving flexibility for boards with different active states for SD card detection. [1] [2]chipSelect
variable withSDCARD_CS
inmsc_sdfat.ino
for consistency with the updated configuration.Code Formatting and Readability Enhancements:
init_sdcard
,print_rootdir
, andloop
) to use a consistent inline style for braces, aligning with modern C++ coding standards. [1] [2] [3]msc_external_flash_sdcard.ino
to improve code readability.