Skip to content

update msc sdcad example to work with metro rp2040 #530

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2025

Conversation

hathach
Copy link
Member

@hathach hathach commented May 22, 2025

This pull request introduces improvements to SD card handling and code style consistency in two example files: msc_external_flash_sdcard.ino and msc_sdfat.ino. The changes include adding SD card configuration for the ARDUINO_ADAFRUIT_METRO_RP2040 board, enhancing SD card initialization logic, and cleaning up code formatting for better readability.

SD Card Configuration Updates:

  • Added specific SDCARD_CS, SDCARD_DETECT, and SDCARD_DETECT_ACTIVE definitions for the ARDUINO_ADAFRUIT_METRO_RP2040 board in msc_external_flash_sdcard.ino and msc_sdfat.ino, ensuring compatibility with this board. [1] [2]

SD Card Initialization and Logic Improvements:

  • Updated init_sdcard() and sdcard_ready_callback() to use the new SDCARD_DETECT_ACTIVE macro, improving flexibility for boards with different active states for SD card detection. [1] [2]
  • Replaced the hardcoded chipSelect variable with SDCARD_CS in msc_sdfat.ino for consistency with the updated configuration.

Code Formatting and Readability Enhancements:

  • Reformatted function definitions (init_sdcard, print_rootdir, and loop) to use a consistent inline style for braces, aligning with modern C++ coding standards. [1] [2] [3]
  • Removed unnecessary blank lines in msc_external_flash_sdcard.ino to improve code readability.

@hathach hathach merged commit 805aa2d into master May 22, 2025
24 checks passed
@hathach hathach deleted the test-metro-rp2040-sd branch May 22, 2025 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy