From 11b36a71847f6c1516b56eee9d57f56935a9245d Mon Sep 17 00:00:00 2001 From: Francisco Acosta <fco.ja.ac@gmail.com> Date: Tue, 29 May 2018 20:51:06 +0200 Subject: [PATCH] stm32l1/0: move EEPROM config to periph_conf.h --- cpu/stm32l0/include/cpu_conf.h | 14 -------------- cpu/stm32l0/include/periph_cpu.h | 14 ++++++++++++++ cpu/stm32l1/include/cpu_conf.h | 12 ------------ cpu/stm32l1/include/periph_cpu.h | 12 ++++++++++++ 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/cpu/stm32l0/include/cpu_conf.h b/cpu/stm32l0/include/cpu_conf.h index bae780aef6..d8cb2b5ed4 100644 --- a/cpu/stm32l0/include/cpu_conf.h +++ b/cpu/stm32l0/include/cpu_conf.h @@ -79,20 +79,6 @@ extern "C" { #define FLASHPAGE_RAW_ALIGNMENT (4U) /** @} */ -/** - * @name EEPROM configuration - * @{ - */ -#define EEPROM_START_ADDR (0x08080000) -#if defined(CPU_MODEL_STM32L073RZ) || defined(CPU_MODEL_STM32L072CZ) -#define EEPROM_SIZE (6144U) /* 6kB */ -#elif defined(CPU_MODEL_STM32L053R8) -#define EEPROM_SIZE (2048U) /* 2kB */ -#elif defined(CPU_MODEL_STM32L031K6) -#define EEPROM_SIZE (1024U) /* 1kB */ -#endif -/** @} */ - #ifdef __cplusplus } #endif diff --git a/cpu/stm32l0/include/periph_cpu.h b/cpu/stm32l0/include/periph_cpu.h index edac77599f..a586a7bfc4 100644 --- a/cpu/stm32l0/include/periph_cpu.h +++ b/cpu/stm32l0/include/periph_cpu.h @@ -76,6 +76,20 @@ typedef struct { */ #define PM_BLOCKER_INITIAL { .val_u32 = 0x01010101 } +/** + * @name EEPROM configuration + * @{ + */ +#define EEPROM_START_ADDR (0x08080000) +#if defined(CPU_MODEL_STM32L073RZ) || defined(CPU_MODEL_STM32L072CZ) +#define EEPROM_SIZE (6144U) /* 6kB */ +#elif defined(CPU_MODEL_STM32L053R8) +#define EEPROM_SIZE (2048U) /* 2kB */ +#elif defined(CPU_MODEL_STM32L031K6) +#define EEPROM_SIZE (1024U) /* 1kB */ +#endif +/** @} */ + #ifdef __cplusplus } #endif diff --git a/cpu/stm32l1/include/cpu_conf.h b/cpu/stm32l1/include/cpu_conf.h index af78bf0516..cb86a3bf53 100644 --- a/cpu/stm32l1/include/cpu_conf.h +++ b/cpu/stm32l1/include/cpu_conf.h @@ -93,18 +93,6 @@ extern "C" { #define FLASHPAGE_RAW_ALIGNMENT (4U) /** @} */ -/** - * @name EEPROM configuration - * @{ - */ -#define EEPROM_START_ADDR (0x08080000) -#if defined(CPU_MODEL_STM32L152RE) -#define EEPROM_SIZE (16384UL) /* 16kB */ -#elif defined(CPU_MODEL_STM32L151RC) -#define EEPROM_SIZE (8192U) /* 8kB */ -#endif -/** @} */ - #ifdef __cplusplus } #endif diff --git a/cpu/stm32l1/include/periph_cpu.h b/cpu/stm32l1/include/periph_cpu.h index 9144f9e5ff..2e453ac0f7 100644 --- a/cpu/stm32l1/include/periph_cpu.h +++ b/cpu/stm32l1/include/periph_cpu.h @@ -73,6 +73,18 @@ typedef enum { } adc_res_t; /** @} */ +/** + * @name EEPROM configuration + * @{ + */ +#define EEPROM_START_ADDR (0x08080000) +#if defined(CPU_MODEL_STM32L152RE) +#define EEPROM_SIZE (16384UL) /* 16kB */ +#elif defined(CPU_MODEL_STM32L151RC) +#define EEPROM_SIZE (8192U) /* 8kB */ +#endif +/** @} */ + #ifdef __cplusplus } #endif -- GitLab