altos/avr: SPI mutex is now held by the caller, not the SPI driver
authorKeith Packard <keithp@keithp.com>
Tue, 11 Oct 2011 22:03:04 +0000 (16:03 -0600)
committerKeith Packard <keithp@keithp.com>
Tue, 11 Oct 2011 22:03:04 +0000 (16:03 -0600)
commit06b044629951b06c7ec9b0105b89f51b2880ebd0
treed7bebe85625736a3e59491c314449764bb713a5c
parent5d1361c95f94125cda244b4cc5e55c2fb77b680b
altos/avr: SPI mutex is now held by the caller, not the SPI driver

SPI transactions generally require a read followed by a write, with
the chip select held the whole time. As a result, the SPI bus must be
held across multiple transactions. To make this reliable, the caller
must hold the SPI mutex, instead of the underlying SPI driver.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/avr/ao_spi_usart.c