mirror of https://github.com/ARMmbed/mbed-os.git
NRF5 - Fix usage of volatile variable in nordic critical section implementations.
parent
597f104685
commit
dcf03310d0
|
@ -21,12 +21,12 @@
|
||||||
#include "nrf_soc.h"
|
#include "nrf_soc.h"
|
||||||
#include "nrf_sdm.h"
|
#include "nrf_sdm.h"
|
||||||
|
|
||||||
static volatile union {
|
static union {
|
||||||
uint32_t _PRIMASK_state;
|
uint32_t _PRIMASK_state;
|
||||||
uint8_t _sd_state;
|
uint8_t _sd_state;
|
||||||
} _state = { 0 } ;
|
} _state = { 0 } ;
|
||||||
static volatile uint32_t _entry_count = 0;
|
static volatile uint32_t _entry_count = 0;
|
||||||
static volatile bool _use_softdevice_routine = false;
|
static bool _use_softdevice_routine = false;
|
||||||
|
|
||||||
void core_util_critical_section_enter()
|
void core_util_critical_section_enter()
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include "nrf_sdm.h"
|
#include "nrf_sdm.h"
|
||||||
#include "nrf_nvic.h"
|
#include "nrf_nvic.h"
|
||||||
|
|
||||||
static volatile uint8_t _sd_state = 0;
|
static uint8_t _sd_state = 0;
|
||||||
static volatile uint32_t _entry_count = 0;
|
static volatile uint32_t _entry_count = 0;
|
||||||
|
|
||||||
void core_util_critical_section_enter()
|
void core_util_critical_section_enter()
|
||||||
|
|
Loading…
Reference in New Issue