diff options
Diffstat (limited to 'os/hal')
-rw-r--r-- | os/hal/include/spi.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/os/hal/include/spi.h b/os/hal/include/spi.h index 92fccec61..d7a5c6ecd 100644 --- a/os/hal/include/spi.h +++ b/os/hal/include/spi.h @@ -257,14 +257,14 @@ typedef enum { * @notapi
*/
#define _spi_isr_code(spip) { \
- if (spip->spd_config->spc_endcb) { \
- spip->spd_state = SPI_COMPLETE; \
- spip->spd_config->spc_endcb(spip); \
- if (spip->spd_state == SPI_COMPLETE) \
- spip->spd_state = SPI_READY; \
+ if ((spip)->spd_config->spc_endcb) { \
+ (spip)->spd_state = SPI_COMPLETE; \
+ (spip)->spd_config->spc_endcb(spip); \
+ if ((spip)->spd_state == SPI_COMPLETE) \
+ (spip)->spd_state = SPI_READY; \
} \
else { \
- spip->spd_state = SPI_READY; \
+ (spip)->spd_state = SPI_READY; \
_spi_wakeup(spip); \
} \
}
|