Relatively minor improvements, but the highlights:
Minor renaming for clarity similar to my I2C PR
Support for all the different frame formats the peripheral supports
Support for all the different bit widths the peripheral supports
TX FIFO preloading for performance improvements:
Example transaction before:
Example transaction with preloading (no gap!):
Removed configuration of GPIO pins in peripheral driver
This actually had some immediate benefits, as the way the RP2040 peripheral controls the CSN pin automatically is a bit odd, it toggles CSN high after every byte when a GPIO is configured to .spi function:
For the flash chip I tested this driver on, this would actually make it unusable was I forced to use this
Instead, I manually drive CSN via a GPIO, which works perfectly well
Not configuring the GPIOs within the peripheral driver gives users of the HAL this kind of flexibility
Relatively minor improvements, but the highlights:
Example transaction before:
Example transaction with preloading (no gap!):
CSN
pin automatically is a bit odd, it toggles CSN high after every byte when a GPIO is configured to.spi
function:Not configuring the GPIOs within the peripheral driver gives users of the HAL this kind of flexibility
The full test suite I wrote for this driver can be found here: https://github.com/haydenridd/microzig/tree/rp2040-spi