-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for composite report HIDs (better mouse compatibility).
- Loading branch information
1 parent
2187999
commit 42ff6b7
Showing
8 changed files
with
107 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
set(PICO_EXAMPLE_URL_BASE "https://github.com/raspberrypi/pico-examples/tree/HEAD") | ||
macro(example_auto_set_url TARGET) | ||
file(RELATIVE_PATH URL_REL_PATH "${PICO_EXAMPLES_PATH}" "${CMAKE_CURRENT_LIST_DIR}") | ||
pico_set_program_url(${TARGET} "${PICO_EXAMPLE_URL_BASE}/${URL_REL_PATH}") | ||
endmacro() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# This is a copy of <PICO_EXTRAS_PATH>/external/pico_extras_import.cmake | ||
|
||
# This can be dropped into an external project to help locate pico-extras | ||
# It should be include()ed prior to project() | ||
|
||
if (DEFINED ENV{PICO_EXTRAS_PATH} AND (NOT PICO_EXTRAS_PATH)) | ||
set(PICO_EXTRAS_PATH $ENV{PICO_EXTRAS_PATH}) | ||
message("Using PICO_EXTRAS_PATH from environment ('${PICO_EXTRAS_PATH}')") | ||
endif () | ||
|
||
if (DEFINED ENV{PICO_EXTRAS_FETCH_FROM_GIT} AND (NOT PICO_EXTRAS_FETCH_FROM_GIT)) | ||
set(PICO_EXTRAS_FETCH_FROM_GIT $ENV{PICO_EXTRAS_FETCH_FROM_GIT}) | ||
message("Using PICO_EXTRAS_FETCH_FROM_GIT from environment ('${PICO_EXTRAS_FETCH_FROM_GIT}')") | ||
endif () | ||
|
||
if (DEFINED ENV{PICO_EXTRAS_FETCH_FROM_GIT_PATH} AND (NOT PICO_EXTRAS_FETCH_FROM_GIT_PATH)) | ||
set(PICO_EXTRAS_FETCH_FROM_GIT_PATH $ENV{PICO_EXTRAS_FETCH_FROM_GIT_PATH}) | ||
message("Using PICO_EXTRAS_FETCH_FROM_GIT_PATH from environment ('${PICO_EXTRAS_FETCH_FROM_GIT_PATH}')") | ||
endif () | ||
|
||
if (NOT PICO_EXTRAS_PATH) | ||
if (PICO_EXTRAS_FETCH_FROM_GIT) | ||
include(FetchContent) | ||
set(FETCHCONTENT_BASE_DIR_SAVE ${FETCHCONTENT_BASE_DIR}) | ||
if (PICO_EXTRAS_FETCH_FROM_GIT_PATH) | ||
get_filename_component(FETCHCONTENT_BASE_DIR "${PICO_EXTRAS_FETCH_FROM_GIT_PATH}" REALPATH BASE_DIR "${CMAKE_SOURCE_DIR}") | ||
endif () | ||
FetchContent_Declare( | ||
pico_extras | ||
GIT_REPOSITORY https://github.com/raspberrypi/pico-extras | ||
GIT_TAG master | ||
) | ||
if (NOT pico_extras) | ||
message("Downloading Raspberry Pi Pico Extras") | ||
FetchContent_Populate(pico_extras) | ||
set(PICO_EXTRAS_PATH ${pico_extras_SOURCE_DIR}) | ||
endif () | ||
set(FETCHCONTENT_BASE_DIR ${FETCHCONTENT_BASE_DIR_SAVE}) | ||
else () | ||
if (PICO_SDK_PATH AND EXISTS "${PICO_SDK_PATH}/../pico-extras") | ||
set(PICO_EXTRAS_PATH ${PICO_SDK_PATH}/../pico-extras) | ||
message("Defaulting PICO_EXTRAS_PATH as sibling of PICO_SDK_PATH: ${PICO_EXTRAS_PATH}") | ||
endif() | ||
endif () | ||
endif () | ||
|
||
if (PICO_EXTRAS_PATH) | ||
set(PICO_EXTRAS_PATH "${PICO_EXTRAS_PATH}" CACHE PATH "Path to the PICO EXTRAS") | ||
set(PICO_EXTRAS_FETCH_FROM_GIT "${PICO_EXTRAS_FETCH_FROM_GIT}" CACHE BOOL "Set to ON to fetch copy of PICO EXTRAS from git if not otherwise locatable") | ||
set(PICO_EXTRAS_FETCH_FROM_GIT_PATH "${PICO_EXTRAS_FETCH_FROM_GIT_PATH}" CACHE FILEPATH "location to download EXTRAS") | ||
|
||
get_filename_component(PICO_EXTRAS_PATH "${PICO_EXTRAS_PATH}" REALPATH BASE_DIR "${CMAKE_BINARY_DIR}") | ||
if (NOT EXISTS ${PICO_EXTRAS_PATH}) | ||
message(FATAL_ERROR "Directory '${PICO_EXTRAS_PATH}' not found") | ||
endif () | ||
|
||
set(PICO_EXTRAS_PATH ${PICO_EXTRAS_PATH} CACHE PATH "Path to the PICO EXTRAS" FORCE) | ||
add_subdirectory(${PICO_EXTRAS_PATH} pico_extras) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
if (TARGET tinyusb_host) | ||
add_subdirectory(host) | ||
else () | ||
message("Cannot build, TinyUSB unavailable") | ||
message("Skipping TinyUSB host examples as TinyUSB is unavailable") | ||
endif () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
set(FAMILY rp2040) | ||
set(BOARD pico_sdk) | ||
set(TINYUSB_FAMILY_PROJECT_NAME_PREFIX "tinyusb_host_") | ||
# Hack as some host examples use $TOP in their path | ||
set(TOP ${PICO_TINYUSB_PATH}) | ||
add_subdirectory(${PICO_TINYUSB_PATH}/examples/host tinyusb_host_examples) | ||
|
||
add_subdirectory(usb_to_ps1_mouse) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.