contiki-os/contiki — pull request #352 by bradjc (2013-09-10 00:31:37+00:00)
Title: Added SPI driver for CC2538

This uses the `core/dev/spi.h` header and implements the `spi_init()` function and the various macros for SPI operation. ssi.h contains all of the register locations and information.

This implementation is not very versatile, mostly because I don't how to make it flexible in the contiki system. It supports pin muxing for the four spi pins, but other than that picks sensible defaults.

The SPI macros (like `SPI_READ()`) are defined in `platform/cc2538dk/contiki-conf.h`. Is there a better place for them? They are CPU specific so I think they should be in cpu/cc2538, but there doesn't seem to be a logical place given that spi.h is already defined.