-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
35 lines (24 loc) · 1.15 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
cmake_minimum_required(VERSION 3.13)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
# Pull in Raspberry Pi Pico SDK
include(pico_sdk_import.cmake)
if (PICO_SDK_VERSION_STRING VERSION_LESS "1.5.1")
message(FATAL_ERROR "Raspberry Pi Pico SDK version 1.5.1 (or later) required. Your version is ${PICO_SDK_VERSION_STRING}")
endif()
project(hid2cdc C CXX ASM)
# Initialise the Raspberry Pi Pico SDK
pico_sdk_init()
add_executable(hid2cdc hid2cdc.c)
add_compile_definitions(CTRLALTDEL=3) # ctrl-alt-del reset output GPIO
add_compile_definitions(NUMLOCK=2) # jumper GPIO to GND for initial numlock on
add_compile_definitions(QWERTZ=6) # jumper GPIO to GND for QWERTZ keyboard
add_compile_definitions(DELAYMS=500) # typematic delay in milliseconds
add_compile_definitions(REPEATUS=50000) # typematic repeat interval in microseconds
pico_set_program_name(hid2cdc "hid2cdc")
pico_set_program_version(hid2cdc "1.0")
pico_enable_stdio_uart(hid2cdc 1)
pico_enable_stdio_usb(hid2cdc 0)
target_include_directories(hid2cdc PUBLIC ${CMAKE_CURRENT_LIST_DIR})
target_link_libraries(hid2cdc pico_stdlib tinyusb_host tinyusb_board)
pico_add_extra_outputs(hid2cdc)