These are changes to just the firmware aspect of the code repository. As discussed in #2 .
The main change here is a simple pin mapping capability driven by pre-processor logic. This allows creating u2if firmware builds for other RP2040 based boards that route different pins out. The pins are defined in pins.h and then mapped to u2if in PicoInterfacesBoard.h. Then in CMakeLists.txt, set the target board before building. I'm super unfamiliar with cmake, so there may be a better "cmake way" of doing this?
The original variable names in PicoInterfacesBoard.h were left in place. For example:
GP18_SPI0_CK = U2IF_SPI0_CK,
may not have anything to do with GP18. It's just "pin to use for index 0 SPI clock". This was done to simply allow changing as little code as possible.
Also, currently all interfaces are defined and left enabled. For boards that don't route out all of these, unused pins are specified. Might make sense to have the interfaces be enabled conditionally also. But deferring that work for now.
Additional changes are:
Includes pin mappings for several Adafruit RP2040 based boards
Change to including pico-sdk as a submodule
Minor code fixes that help when building firmware with newer gcc versions
These are changes to just the firmware aspect of the code repository. As discussed in #2 .
The main change here is a simple pin mapping capability driven by pre-processor logic. This allows creating u2if firmware builds for other RP2040 based boards that route different pins out. The pins are defined in
pins.h
and then mapped to u2if inPicoInterfacesBoard.h
. Then inCMakeLists.txt
, set the target board before building. I'm super unfamiliar with cmake, so there may be a better "cmake way" of doing this?The original variable names in
PicoInterfacesBoard.h
were left in place. For example:may not have anything to do with GP18. It's just "pin to use for index 0 SPI clock". This was done to simply allow changing as little code as possible.
Also, currently all interfaces are defined and left enabled. For boards that don't route out all of these, unused pins are specified. Might make sense to have the interfaces be enabled conditionally also. But deferring that work for now.
Additional changes are: