SPI, I2C, and Other Improvements
Recently I’ve been frantically coding to prepare Pygmy for it’s first stable release. A few structural issues I felt strongly about are currently “under the knife”.
I have separated the xmodem driver from the bootloader into it’s own source to allow easy implementation on the application side.
I’m separating the filesystem into two groups of source, allowing a clean io abstraction layer between the filesystem and the hardware. This is to allow support for additional Flash and SRAM ICs to be added.
The real improvements have been to the SPI and I2C interfaces. The I2C interface has been heavily reworked and tested against a variety of devices as well as a protocol analyzer. The SPI interface has also been heavily reworked to simplify usage and reduce overhead by nearly eliminating the need to write wrappers for specific devices. The devices which handle high level transactions, such as address then data and chip select toggling are named Put and Get. Low level transaction used by the high level or to create wrappers are named Write and Read. Example spiPutChar(). Both SPI and I2C also support port selectable address width, 32bit/16bit/8bit for SPI and 16bit/8bit for I2C.
A few parting notes: Support for Python is now on the list but will take some time. The bootloader will be released in a 16KB version with the addition of the socket interface and a new descriptor interface. An event system will be added to support the GUI, xmodem and socket interfaces. The command queue will be revamped to handle internet connections more reliably.