cmake_minimum_required(VERSION 3.12)

set(PICO_BOARD walkie_talkies)
set(PICO_BOARD_HEADER_DIRS ${CMAKE_SOURCE_DIR}/boards/)

# Pull in SDK (must be before project)
include(pico_sdk_import.cmake)

project(walkie_talkies)

pico_sdk_init()

set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)

add_executable(uart_test
  src/uart_test.c
  )

target_link_libraries(uart_test pico_stdlib)

pico_enable_stdio_usb(uart_test 1)
pico_enable_stdio_uart(uart_test 0)

pico_add_extra_outputs(uart_test)

add_executable(blink_test
  src/blink_test.c
  )

target_link_libraries(blink_test pico_stdlib)

pico_enable_stdio_usb(blink_test 1)
pico_enable_stdio_uart(blink_test 0)

pico_add_extra_outputs(blink_test)

add_executable(spi_test
  src/spi_test.c
  )

target_link_libraries(spi_test
  pico_stdlib
  hardware_spi
  )

pico_enable_stdio_usb(spi_test 1)
pico_enable_stdio_uart(spi_test 0)

pico_add_extra_outputs(spi_test)
