rp2_sd: make debug flags accessible through cmake variables.
All checks were successful
Build RPi Pico firmware image / Build-Firmware (push) Successful in 3m33s
Check code formatting / Check-C-Format (push) Successful in 7s
Check code formatting / Check-Python-Flake8 (push) Successful in 9s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 5s
Run unit tests on host / Run-Unit-Tests (push) Successful in 8s
All checks were successful
Build RPi Pico firmware image / Build-Firmware (push) Successful in 3m33s
Check code formatting / Check-C-Format (push) Successful in 7s
Check code formatting / Check-Python-Flake8 (push) Successful in 9s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 5s
Run unit tests on host / Run-Unit-Tests (push) Successful in 8s
This commit is contained in:
@@ -11,6 +11,8 @@ project(standalone_mp3)
|
||||
|
||||
option(ENABLE_WRITE_TEST "Enable write test" OFF)
|
||||
option(ENABLE_PLAY_TEST "Enable mp3 playback test" OFF)
|
||||
option(ENABLE_SD_READ_CRC "Enable crc check when reading from sd card" OFF)
|
||||
option(ENABLE_SD_DEBUG "Enable debug output for sd card driver" OFF)
|
||||
|
||||
# initialize the Raspberry Pi Pico SDK
|
||||
pico_sdk_init()
|
||||
@@ -39,6 +41,14 @@ if(ENABLE_PLAY_TEST)
|
||||
target_compile_definitions(standalone_mp3 PRIVATE PLAY_TEST)
|
||||
endif()
|
||||
|
||||
if(ENABLE_SD_READ_CRC)
|
||||
target_compile_definitions(standalone_mp3 PRIVATE SD_READ_CRC_CHECK)
|
||||
endif()
|
||||
|
||||
if(ENABLE_SD_DEBUG)
|
||||
target_compile_definitions(standalone_mp3 PRIVATE SD_DEBUG)
|
||||
endif()
|
||||
|
||||
pico_generate_pio_header(standalone_mp3 ${SD_LIB_DIR}/sd_spi_pio.pio)
|
||||
|
||||
pico_generate_pio_header(standalone_mp3 ${CMAKE_CURRENT_LIST_DIR}/i2s_max98357.pio)
|
||||
|
||||
Reference in New Issue
Block a user