krüe :: avrforth :: spi

spi

The spi is a high speed synchronous serial interface. avrforth currently initializes the spi to master mode running at maximum speed (clk/2). Slave select lines must be handled by the application code, although avrforth does initialize the ss line as an output to avoid automatically entering slave mode.

word stack description
spi ( -- ) enable spi
/spi ( -- ) disable spi
spix ( c1 -- c2 ) transfer byte
spitx ( c -- ) send byte
spirx ( -- c ) receive byte