diff --git a/f4/include/devices/stm32f4xx.h b/f4/include/devices/stm32f4xx.h
index e8297aad8c04ed5cde1078eeae9bf87bf543fa9c..a23b9c0d25ae3dca5679cec3a61c27be65413502 100644
--- a/f4/include/devices/stm32f4xx.h
+++ b/f4/include/devices/stm32f4xx.h
@@ -216,7 +216,9 @@ typedef enum
 
 #define CLEAR_REG(REG)        ((REG) = (0x0))
 
-#define WRITE_REG(REG, VAL)   ((REG) = (VAL))
+#ifndef WRITE_REG
+  #define WRITE_REG(REG, VAL)   ((REG) = (VAL))
+#endif
 
 #define READ_REG(REG)         ((REG))
 
diff --git a/f4/include/stm32f4xx_ll_adc.h b/f4/include/stm32f4xx_ll_adc.h
index 808d0b9d2f69329c8b74d71f2e44074592315c3f..7c5b3e84811bf51d826bd1031cfad383938b3aed 100644
--- a/f4/include/stm32f4xx_ll_adc.h
+++ b/f4/include/stm32f4xx_ll_adc.h
@@ -293,8 +293,10 @@ extern "C" {
   * @param  __REG_OFFFSET__ Offset to be applied (unit number of registers).
   * @retval Pointer to register address
   */
-#define __ADC_PTR_REG_OFFSET(__REG__, __REG_OFFFSET__)                         \
- ((__IO uint32_t *)((uint32_t) ((uint32_t)(&(__REG__)) + ((__REG_OFFFSET__) << 2UL))))
+#ifndef __ADC_PTR_REG_OFFSET
+  #define __ADC_PTR_REG_OFFSET(__REG__, __REG_OFFFSET__)                         \
+   ((__IO uint32_t *)((uint32_t) ((uint32_t)(&(__REG__)) + ((__REG_OFFFSET__) << 2UL))))
+#endif
 
 /**
   * @}