Added safety () around a macro parameter.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2315 35acf78f-673a-0410-8e92-d51de3d6d3f4
master
gdisirio 2010-11-01 09:20:34 +00:00
parent a53d698bb3
commit a5c6d5b45b
1 changed files with 6 additions and 6 deletions

View File

@ -257,14 +257,14 @@ typedef enum {
* @notapi * @notapi
*/ */
#define _spi_isr_code(spip) { \ #define _spi_isr_code(spip) { \
if (spip->spd_config->spc_endcb) { \ if ((spip)->spd_config->spc_endcb) { \
spip->spd_state = SPI_COMPLETE; \ (spip)->spd_state = SPI_COMPLETE; \
spip->spd_config->spc_endcb(spip); \ (spip)->spd_config->spc_endcb(spip); \
if (spip->spd_state == SPI_COMPLETE) \ if ((spip)->spd_state == SPI_COMPLETE) \
spip->spd_state = SPI_READY; \ (spip)->spd_state = SPI_READY; \
} \ } \
else { \ else { \
spip->spd_state = SPI_READY; \ (spip)->spd_state = SPI_READY; \
_spi_wakeup(spip); \ _spi_wakeup(spip); \
} \ } \
} }