paparazzi/paparazzi — pull request #313 by gtoonstra (2012-10-30 14:02:41+00:00)
Title: finalization of SPI implementation.

These are further improvements to the new SPI implementation using libopencm3. It is now possible to reconfigure the SPI bus per transaction, thus also when any device starts using the bus (overriding the defaults). When the config doesn't change, the bus is not reconfigured.

The suspend/resume functionality is also added (spi_lock/spi_resume).

Some further improvements and bug fixes made.

This has now only been testing using aspirin2 on SPI2 and a new W5100 ethernet chip implementation on SPI1 (the external SPI).

The "rx" parameter was removed from the callback function prototype. I noticed in the end that the callback is only called when the transaction is finished. For tx+rx type transactions, this is when the rx is finished. for tx only, when tx ends. For rx only, when rx ends. The callback passes the transaction that has finished executing.

This should wrap up the work on the SPI improvements, pending a lot more testing by other people of course. Please review.