add rp2040 to host example build#684
Conversation
| ${TOP}/src/portable/raspberrypi/${FAMILY}/rp2040_usb.c | ||
| ${TOP}/src/portable/raspberrypi/${FAMILY}/dcd_rp2040.c | ||
| ${TOP}/src/portable/raspberrypi/${FAMILY}/hcd_rp2040.c | ||
| ) |
There was a problem hiding this comment.
We have split our cmake into a device and host mode so you don't unnecessarily compile both.
There was a problem hiding this comment.
There was a problem hiding this comment.
That is ok though, tinyusb is designed to be all included and controlled by config file. To be honest that make my example easier 😄
PS: also there may be dual role example later on, often is use to detect whether board is connected to pc or accessories using ID pin.
| CFG_TUSB_OS=OPT_OS_PICO | ||
| ) | ||
|
|
||
| target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration) |
There was a problem hiding this comment.
The USB device enumeration fix only applies to device mode. Perhaps this should be linked in by family.cmake?
There was a problem hiding this comment.
It is ok as well, since the code is not run anyway, as above. There may be otg example later on
* added board header for adafruit macropad rp2040 Co-authored-by: Daniel Kenyon-Jones <mail@dlkj.co.uk>
Describe the PR
Add RP2040 to host example build. Also change
ifdef RP2040_USB_HOST_MODEtoif TUSB_OPT_HOST_ENABLEDto be consistent with tinyusb host detection convention.