Module SPIdev
- Conceptually and technically simplified device handling API for a complete initialisation and configuration, via the “standard”
Init,Configure, andEnableidiom. - All used GPIO pins and pads are configured by the client module or program. I have considered passing a corresponding configuration procedure,1 defined in the client or program, to
Configure, but this configuration procedure can also be called directly from there. This has the additional benefit that the config procedure can have any signature, so we can use parameters, eg. for configuring two set of pins and pads. See moduleMainfor an example.
- SPI device configuration changes, as needed for individual external peripherals, can be made – if required – based on the initial configuration as per
Configure, or the currently active configuration. SeeGetBaseRunCfg,GetCurrentRunCfg,SetSclkRate,SetTxShift, andPutRunCfg. - See example program SPIrtc2.
Module UARTdev
- As for SPI devices, all used GPIO pins and pads are configured by the client module or program.
- Update modules
MainandTerminalsaccordingly.
Modules Main and Terminals
- See module UARTdev: configure GPIO pins and pads.
Module RTCds3234
- Move module from
/examples/v1/spirtcto/lib/board/rp2040/any. - Generalise and adjust for updated SPIdev (see above).
- Directory
/examples/v2/spirtc2contains a test versionRTCds3234testto demo dynamic configuration adaptations. - Directory
/examples/v1/spirtcstill contains the former version.
Module GPIO
- Rename
PadConfigtoPadCfgfor consistency with device modules. - Rename two fields in
PadCfg.
Library Directory Renaming
/lib/boards/m0is now/lib/boards/rp2040.- Requires updating Astrobe’s library search path.
- Config files
RP2040-k1.iniandRP2040-k2.iniin/config/m0are updated accordingly.
New Example Program SPIrtc2
- Creatively named
SPIrtc2, derived from SPIrtc, this example program shows the straightforward use of the updated SPIdev module. - See SPIrtc2.
-
Borrowing a design concept from Astrobe’s corresponding modules. ↩︎