Initial USB HID implementation

- One button reported as gamepad button
- One LED controlable via application specific HID report and FlyWithLua
This commit is contained in:
2023-03-17 18:00:26 +01:00
commit 959699c1d3
10 changed files with 553 additions and 0 deletions

23
CMakeLists.txt Normal file
View File

@@ -0,0 +1,23 @@
cmake_minimum_required(VERSION 3.13)
# initialize pico-sdk from submodule
# note: this must happen before project()
include(pico-sdk/pico_sdk_init.cmake)
project(rp2040_hid)
# initialize the Raspberry Pi Pico SDK
pico_sdk_init()
add_executable(rp2040_hid
src/main.c
src/usb_config.c
)
# Add pico_stdlib library which aggregates commonly used features
target_link_libraries(rp2040_hid pico_stdlib pico_unique_id tinyusb_device tinyusb_board)
target_include_directories(rp2040_hid PRIVATE src)
# create map/bin/hex/uf2 file in addition to ELF.
pico_add_extra_outputs(rp2040_hid)