From bf6e854a85bfde07028af4ed68e2679ed6905fca Mon Sep 17 00:00:00 2001 From: Joseph Newman Date: Tue, 13 Nov 2018 02:23:20 +0000 Subject: [PATCH] [efr32] add missing volatile qualifiers (#3292) --- examples/platforms/efr32/radio.c | 16 ++++++++-------- examples/platforms/efr32/uart.c | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/platforms/efr32/radio.c b/examples/platforms/efr32/radio.c index 5eb2839a0..634325818 100644 --- a/examples/platforms/efr32/radio.c +++ b/examples/platforms/efr32/radio.c @@ -67,19 +67,19 @@ enum EFR32_RECEIVE_SENSITIVITY = -100, // dBm }; -static uint16_t sPanId = 0; -static bool sTransmitBusy = false; -static bool sPromiscuous = false; -static bool sIsSrcMatchEnabled = false; -static otRadioState sState = OT_RADIO_STATE_DISABLED; +static uint16_t sPanId = 0; +static volatile bool sTransmitBusy = false; +static bool sPromiscuous = false; +static bool sIsSrcMatchEnabled = false; +static otRadioState sState = OT_RADIO_STATE_DISABLED; static uint8_t sReceivePsdu[IEEE802154_MAX_LENGTH]; static otRadioFrame sReceiveFrame; static otError sReceiveError; -static otRadioFrame sTransmitFrame; -static uint8_t sTransmitPsdu[IEEE802154_MAX_LENGTH]; -static otError sTransmitError; +static otRadioFrame sTransmitFrame; +static uint8_t sTransmitPsdu[IEEE802154_MAX_LENGTH]; +static volatile otError sTransmitError; typedef struct srcMatchEntry { diff --git a/examples/platforms/efr32/uart.c b/examples/platforms/efr32/uart.c index 32f0741c4..ec610157f 100644 --- a/examples/platforms/efr32/uart.c +++ b/examples/platforms/efr32/uart.c @@ -76,16 +76,16 @@ static UARTDRV_HandleData_t sUartHandleData; static UARTDRV_Handle_t sUartHandle = &sUartHandleData; static uint8_t sReceiveBuffer[2]; static const uint8_t * sTransmitBuffer = NULL; -static uint16_t sTransmitLength = 0; +static volatile uint16_t sTransmitLength = 0; typedef struct ReceiveFifo_t { // The data buffer uint8_t mBuffer[kReceiveFifoSize]; // The offset of the first item written to the list. - uint16_t mHead; + volatile uint16_t mHead; // The offset of the next item to be written to the list. - uint16_t mTail; + volatile uint16_t mTail; } ReceiveFifo_t; static ReceiveFifo_t sReceiveFifo;