1234567891011121314151617181920212223242526272829303132 |
- cmake_minimum_required(VERSION 3.13)
- # initialize the SDK based on PICO_SDK_PATH
- # note: this must happen before project()
- include(pico_sdk_import.cmake)
- project(ADRS2040U_i2c)
- # initialize the Raspberry Pi Pico SDK
- pico_sdk_init()
- add_executable(${PROJECT_NAME}
- adc_driver.hpp
- main.cpp
- )
- # Add pico_stdlib library which aggregates commonly used features
- target_link_libraries(${PROJECT_NAME}
- pico_stdlib
- hardware_i2c
- pico_i2c_slave
- hardware_spi
- hardware_adc
- hardware_irq
- pico_multicore
- )
- pico_enable_stdio_usb(${PROJECT_NAME} 1)
- pico_enable_stdio_uart(${PROJECT_NAME} 0)
- # create map/bin/hex/uf2 file in addition to ELF.
- pico_add_extra_outputs(${PROJECT_NAME})
|