From 334b2d64b01724a467ea99210c752de39cc23b6e Mon Sep 17 00:00:00 2001 From: deepikabhavnani Date: Mon, 30 Oct 2017 10:07:28 -0500 Subject: [PATCH] Update params in calls to LDREXW/STREXW to uint32_t --- .../TARGET_STM/TARGET_STM32F2/device/stm32f2xx_hal_def.h | 8 ++++---- .../TARGET_STM/TARGET_STM32F3/device/stm32f3xx_hal_def.h | 8 ++++---- .../TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_def.h | 8 ++++---- .../TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_def.h | 8 ++++---- .../TARGET_STM/TARGET_STM32L4/device/stm32l4xx_hal_def.h | 8 ++++---- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/targets/TARGET_STM/TARGET_STM32F2/device/stm32f2xx_hal_def.h b/targets/TARGET_STM/TARGET_STM32F2/device/stm32f2xx_hal_def.h index ea2397fe57..30b200c4ef 100644 --- a/targets/TARGET_STM/TARGET_STM32F2/device/stm32f2xx_hal_def.h +++ b/targets/TARGET_STM/TARGET_STM32F2/device/stm32f2xx_hal_def.h @@ -130,9 +130,9 @@ static inline void atomic_set_u32(volatile uint32_t *ptr, uint32_t mask) { uint32_t newValue; do { - newValue = (uint32_t)__LDREXW(ptr) | mask; + newValue = (uint32_t)__LDREXW((volatile uint32_t *)ptr) | mask; - } while (__STREXW(newValue, ptr)); + } while (__STREXW(newValue,(volatile uint32_t *) ptr)); } @@ -140,9 +140,9 @@ static inline void atomic_clr_u32(volatile uint32_t *ptr, uint32_t mask) { uint32_t newValue; do { - newValue = (uint32_t)__LDREXW(ptr) &~mask; + newValue = (uint32_t)__LDREXW((volatile uint32_t *)ptr) &~mask; - } while (__STREXW(newValue, ptr)); + } while (__STREXW(newValue,(volatile uint32_t *) ptr)); } #if defined ( __GNUC__ ) && !defined ( __CC_ARM ) diff --git a/targets/TARGET_STM/TARGET_STM32F3/device/stm32f3xx_hal_def.h b/targets/TARGET_STM/TARGET_STM32F3/device/stm32f3xx_hal_def.h index b061f993a7..a3bf831813 100644 --- a/targets/TARGET_STM/TARGET_STM32F3/device/stm32f3xx_hal_def.h +++ b/targets/TARGET_STM/TARGET_STM32F3/device/stm32f3xx_hal_def.h @@ -133,9 +133,9 @@ static inline void atomic_set_u32(volatile uint32_t *ptr, uint32_t mask) { uint32_t newValue; do { - newValue = (uint32_t)__LDREXW(ptr) | mask; + newValue = (uint32_t)__LDREXW((volatile uint32_t *)ptr) | mask; - } while (__STREXW(newValue, ptr)); + } while (__STREXW(newValue,(volatile uint32_t *) ptr)); } // MBED patch @@ -143,9 +143,9 @@ static inline void atomic_clr_u32(volatile uint32_t *ptr, uint32_t mask) { uint32_t newValue; do { - newValue = (uint32_t)__LDREXW(ptr) &~mask; + newValue = (uint32_t)__LDREXW((volatile uint32_t *)ptr) &~mask; - } while (__STREXW(newValue, ptr)); + } while (__STREXW(newValue,(volatile uint32_t *) ptr)); } // MBED patch diff --git a/targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_def.h b/targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_def.h index 9b92655750..4129cc690f 100644 --- a/targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_def.h +++ b/targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_def.h @@ -131,9 +131,9 @@ static inline void atomic_set_u32(volatile uint32_t *ptr, uint32_t mask) { uint32_t newValue; do { - newValue = (uint32_t)__LDREXW(ptr) | mask; + newValue = (uint32_t)__LDREXW((volatile uint32_t *)ptr) | mask; - } while (__STREXW(newValue, ptr)); + } while (__STREXW(newValue,(volatile uint32_t *) ptr)); } @@ -141,9 +141,9 @@ static inline void atomic_clr_u32(volatile uint32_t *ptr, uint32_t mask) { uint32_t newValue; do { - newValue = (uint32_t)__LDREXW(ptr) &~mask; + newValue = (uint32_t)__LDREXW((volatile uint32_t *)ptr) &~mask; - } while (__STREXW(newValue, ptr)); + } while (__STREXW(newValue,(volatile uint32_t *) ptr)); } /* MBED */ diff --git a/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_def.h b/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_def.h index 8c462b2b14..42d590a6b6 100644 --- a/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_def.h +++ b/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_def.h @@ -130,9 +130,9 @@ static inline void atomic_set_u32(volatile uint32_t *ptr, uint32_t mask) { uint32_t newValue; do { - newValue = (uint32_t)__LDREXW(ptr) | mask; + newValue = (uint32_t)__LDREXW((volatile uint32_t *)ptr) | mask; - } while (__STREXW(newValue, ptr)); + } while (__STREXW(newValue,(volatile uint32_t *) ptr)); } @@ -140,9 +140,9 @@ static inline void atomic_clr_u32(volatile uint32_t *ptr, uint32_t mask) { uint32_t newValue; do { - newValue = (uint32_t)__LDREXW(ptr) &~mask; + newValue = (uint32_t)__LDREXW((volatile uint32_t *)ptr) &~mask; - } while (__STREXW(newValue, ptr)); + } while (__STREXW(newValue,(volatile uint32_t *) ptr)); } #if defined ( __GNUC__ ) && !defined ( __CC_ARM ) diff --git a/targets/TARGET_STM/TARGET_STM32L4/device/stm32l4xx_hal_def.h b/targets/TARGET_STM/TARGET_STM32L4/device/stm32l4xx_hal_def.h index fcee1d4eca..b0e34eb05d 100644 --- a/targets/TARGET_STM/TARGET_STM32L4/device/stm32l4xx_hal_def.h +++ b/targets/TARGET_STM/TARGET_STM32L4/device/stm32l4xx_hal_def.h @@ -133,9 +133,9 @@ static inline void atomic_set_u32(volatile uint32_t *ptr, uint32_t mask) { uint32_t newValue; do { - newValue = (uint32_t)__LDREXW(ptr) | mask; + newValue = (uint32_t)__LDREXW((volatile uint32_t *)ptr) | mask; - } while (__STREXW(newValue, ptr)); + } while (__STREXW(newValue,(volatile uint32_t *) ptr)); } // Added for MBED PR #3062 @@ -143,9 +143,9 @@ static inline void atomic_clr_u32(volatile uint32_t *ptr, uint32_t mask) { uint32_t newValue; do { - newValue = (uint32_t)__LDREXW(ptr) &~mask; + newValue = (uint32_t)__LDREXW((volatile uint32_t *)ptr) &~mask; - } while (__STREXW(newValue, ptr)); + } while (__STREXW(newValue,(volatile uint32_t *) ptr)); } #if defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */