The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
Diff: TARGET_NUCLEO_L486RG/TARGET_STM/TARGET_STM32L4/device/stm32l4xx_hal_def.h
- Revision:
- 132:9baf128c2fab
- Parent:
- 128:9bcdf88f62b0
- Child:
- 142:4eea097334d6
--- a/TARGET_NUCLEO_L486RG/TARGET_STM/TARGET_STM32L4/device/stm32l4xx_hal_def.h Thu Dec 15 11:17:48 2016 +0000 +++ b/TARGET_NUCLEO_L486RG/TARGET_STM/TARGET_STM32L4/device/stm32l4xx_hal_def.h Tue Dec 20 15:36:52 2016 +0000 @@ -124,6 +124,28 @@ (__HANDLE__)->Lock = HAL_UNLOCKED; \ }while (0) #endif /* USE_RTOS */ +#if defined (__CC_ARM) +#pragma diag_suppress 3731 +#endif + +static inline void atomic_set_u32(volatile uint32_t *ptr, uint32_t mask) +{ + uint32_t newValue; + do { + newValue = (uint32_t)__LDREXW((volatile unsigned long *)ptr) | mask; + + } while (__STREXW(newValue,(volatile unsigned long*) ptr)); +} + + +static inline void atomic_clr_u32(volatile uint32_t *ptr, uint32_t mask) +{ + uint32_t newValue; + do { + newValue = (uint32_t)__LDREXW((volatile unsigned long *)ptr) &~mask; + + } while (__STREXW(newValue,(volatile unsigned long*) ptr)); +} #if defined ( __GNUC__ ) #ifndef __weak