WebbotLib AVR library
WebbotLib It just does it
  C++ documentation  C documentation


Allows you to simulate an SPI interface in software.
This is useful when your hardware doesn't provide hardware SPI or if you want additional SPI interfaces.
Note that this currently only supports master mode.
You can use any IO pins for the SPI bus (MOSI, MISO and SCLK).
Assuming we want to use the following pins: B1 for MOSI, B2 for MISO and B3 for SCLK then you can create the interface via:-
#include "spisw.h"
SPI_SW spi = MAKE_SW_SPI(device_list, B1, B2, B3);
Once defined you can use the same functions as described in spi.h

Valid XHTML 1.0 Transitional