Add USB Keyboard support
This commit is contained in:
@@ -35,7 +35,7 @@ pico_sdk_init()
|
||||
|
||||
# Add executable. Default name is the project name, version 0.1
|
||||
|
||||
if (TARGET tinyusb_device)
|
||||
if (TARGET tinyusb_host)
|
||||
add_executable(hello_usb
|
||||
hello_usb.cpp
|
||||
display.cpp
|
||||
@@ -50,6 +50,7 @@ if (TARGET tinyusb_device)
|
||||
|
||||
# Add include directories for e-Paper
|
||||
target_include_directories(hello_usb PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Pico_ePaper_Code/c/lib/Config
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Pico_ePaper_Code/c/lib/e-Paper
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Pico_ePaper_Code/c/lib/Fonts
|
||||
@@ -57,11 +58,11 @@ if (TARGET tinyusb_device)
|
||||
)
|
||||
|
||||
# pull in common dependencies
|
||||
target_link_libraries(hello_usb pico_stdlib pico_ssd1306 hardware_i2c Config ePaper GUI Fonts hardware_spi pico_multicore)
|
||||
target_link_libraries(hello_usb pico_stdlib pico_ssd1306 hardware_i2c Config ePaper GUI Fonts hardware_spi pico_multicore tinyusb_host tinyusb_board)
|
||||
|
||||
# enable usb output, disable uart output
|
||||
pico_enable_stdio_usb(hello_usb 1)
|
||||
pico_enable_stdio_uart(hello_usb 0)
|
||||
pico_enable_stdio_usb(hello_usb 0)
|
||||
pico_enable_stdio_uart(hello_usb 1)
|
||||
|
||||
# create map/bin/hex/uf2 file etc.
|
||||
pico_add_extra_outputs(hello_usb)
|
||||
|
||||
Reference in New Issue
Block a user