diff --git a/CMakeLists.txt b/CMakeLists.txt index 01ed9e0..a0c76a9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,8 +41,13 @@ target_sources(host_cdc_msc_hid PUBLIC lib/sd_driver/SPI/my_spi.c lib/sd_driver/SPI/sd_card_spi.c lib/sd_driver/SPI/sd_spi.c + ws2812.c ) +# generate the header file into the source tree as it is included in the RP2040 datasheet +pico_generate_pio_header(host_cdc_msc_hid ${CMAKE_CURRENT_LIST_DIR}/ws2812.pio) + + # Make sure TinyUSB can find tusb_config.h target_include_directories(host_cdc_msc_hid PUBLIC ${CMAKE_CURRENT_LIST_DIR}/ diff --git a/main.c b/main.c index a515baf..c36e86b 100644 --- a/main.c +++ b/main.c @@ -35,6 +35,7 @@ #include "log.h" #include "com_usb.h" #include "pico/multicore.h" +#include "ws2812.h" //--------------------------------------------------------------------+ // MACRO CONSTANT TYPEDEF PROTYPES @@ -108,6 +109,7 @@ sd_card_t* sd_get_by_num(size_t num) { /*------------- MAIN -------------*/ int main(void) { board_init(); + ws2812_init(); printf("TinyUSB Host CDC MSC HID - Logs\r\n");