Module SPIdev
- Conceptually and technically simplified device handling API for a complete initialisation and configuration, via the “standard”
Init
,Configure
, andEnable
idiom. - 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 moduleMain
for 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
Main
andTerminals
accordingly.
Modules Main and Terminals
- See module UARTdev: configure GPIO pins and pads.
Module RTCds3234
- Move module from
/examples/v1/spirtc
to/lib/board/rp2040/any
. - Generalise and adjust for updated SPIdev (see above).
- Directory
/examples/v2/spirtc2
contains a test versionRTCds3234test
to demo dynamic configuration adaptations. - Directory
/examples/v1/spirtc
still contains the former version.
Module GPIO
- Rename
PadConfig
toPadCfg
for consistency with device modules. - Rename two fields in
PadCfg
.
Library Directory Renaming
/lib/boards/m0
is now/lib/boards/rp2040
.- Requires updating Astrobe’s library search path.
- Config files
RP2040-k1.ini
andRP2040-k2.ini
in/config/m0
are 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. ↩︎