The SPI module is mostly written but still untested. This is some preliminary documentation.
--------
**/spi/enable**
Turn on/off.
------
**/spi/rate**:
Configure clock rate. Fosc /4, /16, /64.
-------
**/spi/mode**:
Configure the transmission waveform. See spec sheet.
- Mode 0: Clock default low, falling edge on data transmit. - Mode 1: Clock default high, rising edge on data. - Mode 2: Clock default low, rising edge on transmit - Mode 3: Clock default low, falling edge on transmit
-----
**/spi/phase**
Configure when sampling occurs relative to clock for reception. Settings are "mid" (default) and "end".
**/spi/tx**
Send data. Details of slave-select, etc are left to the user.
**/spi/rx**
Receive data. Details of slave-select and data-ready are left to the user.