From 5c2cb697aa8d03eed27b45f8dc67957c45a3d722 Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Sun, 20 Nov 2022 01:35:41 +0100 Subject: Onboard neopixel led support --- CMakeLists.txt | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 774f8ed..a6c910f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,26 +2,31 @@ cmake_minimum_required(VERSION 3.5) include(${CMAKE_CURRENT_SOURCE_DIR}/lib/tinyusb/hw/bsp/family_support.cmake) -# gets PROJECT name for the example (e.g. -) family_get_project_name(PROJECT ${CMAKE_CURRENT_LIST_DIR}) project(${PROJECT}) -# Checks this example is valid for the family and initializes the project family_initialize_project(${PROJECT} ${CMAKE_CURRENT_LIST_DIR}) add_executable(${PROJECT}) -# Example source target_sources(${PROJECT} PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/src/main.c - ${CMAKE_CURRENT_SOURCE_DIR}/src/usb_descriptors.c - ) + ${CMAKE_CURRENT_SOURCE_DIR}/src/main.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/neopix.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/usb_descriptors.c +) -# Example include target_include_directories(${PROJECT} PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/src - ) + ${CMAKE_CURRENT_SOURCE_DIR}/src + ${PICO_SDK_PATH}/src/rp2_common/hardware_gpio/include + ${PICO_SDK_PATH}/src/rp2_common/hardware_pio/include +) + +target_link_libraries(${PROJECT} PRIVATE + pico_stdlib + hardware_pio + hardware_gpio +) # Configure compilation flags and libraries for the example... see the corresponding function # in hw/bsp/FAMILY/family.cmake for details. -- cgit v1.2.3-71-gd317