aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32/spi_lld.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-10-11 19:44:44 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-10-11 19:44:44 +0000
commitee12fa3ad1db6a1ab1cde5aef95fcc9c83107225 (patch)
tree0116bfaaf484134b72c5b2a2ffa9055056b0f00a /os/hal/platforms/STM32/spi_lld.c
parent441509bc2c585151a5d5974337d6fd2e156eab2a (diff)
downloadChibiOS-ee12fa3ad1db6a1ab1cde5aef95fcc9c83107225.tar.gz
ChibiOS-ee12fa3ad1db6a1ab1cde5aef95fcc9c83107225.tar.bz2
ChibiOS-ee12fa3ad1db6a1ab1cde5aef95fcc9c83107225.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2248 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32/spi_lld.c')
-rw-r--r--os/hal/platforms/STM32/spi_lld.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/os/hal/platforms/STM32/spi_lld.c b/os/hal/platforms/STM32/spi_lld.c
index cbb7859a3..4dc18e80c 100644
--- a/os/hal/platforms/STM32/spi_lld.c
+++ b/os/hal/platforms/STM32/spi_lld.c
@@ -97,6 +97,12 @@ static void serve_interrupt(SPIDriver *spip) {
/* Wakeup the waiting thread if any, note that the following macro is
empty if the SPI_USE_WAIT option is disabled.*/
_spi_wakeup(spip);
+
+ /* State change.*/
+ if (spip->spd_state == SPI_SYNC)
+ spip->spd_state = SPI_READY;
+ else
+ spip->spd_state = SPI_SELECTED;
}
/*===========================================================================*/