aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include/spi.h
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/include/spi.h')
-rw-r--r--os/hal/include/spi.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/os/hal/include/spi.h b/os/hal/include/spi.h
index f9988631b..5e0fa9e53 100644
--- a/os/hal/include/spi.h
+++ b/os/hal/include/spi.h
@@ -244,13 +244,14 @@ typedef enum {
* @notapi
*/
#define _spi_wakeup_isr(spip) { \
+ chSysLockFromIsr(); \
if ((spip)->thread != NULL) { \
Thread *tp = (spip)->thread; \
(spip)->thread = NULL; \
- chSysLockFromIsr(); \
+ tp->p_u.rdymsg = RDY_OK; \
chSchReadyI(tp); \
- chSysUnlockFromIsr(); \
} \
+ chSysUnlockFromIsr(); \
}
#else /* !SPI_USE_WAIT */
#define _spi_wait_s(spip)