From 4846421f19d01a4ddd9510d01ef76979e368f327 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 28 Sep 2014 16:49:01 +0000 Subject: New headers for STM32F0xx. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7332 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/boards/ST_NUCLEO_F030R8/board.h | 2 +- os/hal/boards/ST_STM32F0_DISCOVERY/board.h | 2 +- os/hal/ports/STM32/STM32F0xx/hal_lld.h | 52 ++++++++++++++++++++------- os/hal/ports/STM32/STM32F0xx/stm32_registry.h | 20 +++++++++++ 4 files changed, 61 insertions(+), 15 deletions(-) (limited to 'os/hal') diff --git a/os/hal/boards/ST_NUCLEO_F030R8/board.h b/os/hal/boards/ST_NUCLEO_F030R8/board.h index c9706ee83..afcf89760 100644 --- a/os/hal/boards/ST_NUCLEO_F030R8/board.h +++ b/os/hal/boards/ST_NUCLEO_F030R8/board.h @@ -47,7 +47,7 @@ /* * MCU type as defined in the ST header. */ -#define STM32F030 +#define STM32F030x8 /* * IO pins assignments. diff --git a/os/hal/boards/ST_STM32F0_DISCOVERY/board.h b/os/hal/boards/ST_STM32F0_DISCOVERY/board.h index 8ceb5ad16..5ae77a5a1 100644 --- a/os/hal/boards/ST_STM32F0_DISCOVERY/board.h +++ b/os/hal/boards/ST_STM32F0_DISCOVERY/board.h @@ -47,7 +47,7 @@ /* * MCU type as defined in the ST header. */ -#define STM32F0XX_MD +#define STM32F051x8 /* * IO pins assignments. diff --git a/os/hal/ports/STM32/STM32F0xx/hal_lld.h b/os/hal/ports/STM32/STM32F0xx/hal_lld.h index 2bb9b3fcc..1784e33cf 100644 --- a/os/hal/ports/STM32/STM32F0xx/hal_lld.h +++ b/os/hal/ports/STM32/STM32F0xx/hal_lld.h @@ -26,6 +26,12 @@ * - STM32_HSE_BYPASS (optionally). * . * One of the following macros must also be defined: + * - STM32F030x6, STM32F030x8 for Value Line devices. + * - STM32F031x6, STM32F038xx, STM32F042x6, STM32F048xx for + * Low Density devices. + * - STM32F051x8, STM32F058xx, STM32F071xB, STM32F072xB, + * STM32F078xx for Medium Density devices. + * * - STM32F030 for Value Line devices. * - STM32F0XX_LD for Low Density devices. * - STM32F0XX_MD for Medium Density devices. @@ -38,6 +44,9 @@ #ifndef _HAL_LLD_H_ #define _HAL_LLD_H_ +/* + * Registry definitions. + */ #include "stm32_registry.h" /*===========================================================================*/ @@ -48,25 +57,42 @@ * @name Platform identification macros * @{ */ -#if defined(STM32F0XX_MD) || defined(__DOXYGEN__) -#define PLATFORM_NAME "STM32F051xx/F061xx Entry Level Medium Density devices" +#if defined(STM32F051x8) || defined(__DOXYGEN__) +#define PLATFORM_NAME "STM32F051x8 Entry Level Medium Density devices" + +#elif defined(STM32F058xx) +#define PLATFORM_NAME "STM32F058xx Entry Level Medium Density devices" + +#elif defined(STM32F071xB) +#define PLATFORM_NAME "STM32F071xB Entry Level Medium Density devices" + +#elif defined(STM32F072xB) +#define PLATFORM_NAME "STM32F072xB Entry Level Medium Density devices" + +#elif defined(STM32F078xx) +#define PLATFORM_NAME "STM32F078xx Entry Level Medium Density devices" + +#elif defined(STM32F031x6) +#define PLATFORM_NAME "STM32F031x6 Entry Level Low Density devices" -#elif defined(STM32F0XX_LD) -#define PLATFORM_NAME "STM32F050xx/F060xx Entry Level Low Density devices" +#elif defined(STM32F038xx) +#define PLATFORM_NAME "STM32F038xx Entry Level Low Density devices" -#elif defined(STM32F030) -#define PLATFORM_NAME "STM32F030xx Entry Level Value Line devices" +#elif defined(STM32F042x6) +#define PLATFORM_NAME "STM32F042x6 Entry Level Low Density devices" + +#elif defined(STM32F048xx) +#define PLATFORM_NAME "STM32F048xx Entry Level Low Density devices" + +#elif defined(STM32F030x6) +#define PLATFORM_NAME "STM32F030x6 Entry Level Value Line devices" + +#elif defined(STM32F030x8) +#define PLATFORM_NAME "STM32F030x8 Entry Level Value Line devices" #else #error "STM32F0xx device not specified" #endif - -/** - * @brief Sub-family identifier. - */ -#if !defined(STM32F0XX) || defined(__DOXYGEN__) -#define STM32F0XX -#endif /** @} */ /** diff --git a/os/hal/ports/STM32/STM32F0xx/stm32_registry.h b/os/hal/ports/STM32/STM32F0xx/stm32_registry.h index 695399369..138745f16 100644 --- a/os/hal/ports/STM32/STM32F0xx/stm32_registry.h +++ b/os/hal/ports/STM32/STM32F0xx/stm32_registry.h @@ -25,6 +25,26 @@ #ifndef _STM32_REGISTRY_H_ #define _STM32_REGISTRY_H_ +#if defined(STM32F051x8) || defined(STM32F058xx) || \ + defined(STM32F071xB) || defined(STM32F072xB) || \ + defined(STM32F078xx) +#define STM32F0XX_MD + +#elif defined(STM32F031x6) || defined(STM32F038xx) || \ + defined(STM32F042x6) || defined(STM32F048xx) +#define STM32F0XX_LD + +#elif defined(STM32F030x6) || defined(STM32F030x8) +#define STM32F030 + +#else +#error "STM32F0xx device not specified" +#endif + +#if !defined(STM32F0XX) || defined(__DOXYGEN__) +#define STM32F0XX +#endif + /*===========================================================================*/ /* Platform capabilities. */ /*===========================================================================*/ -- cgit v1.2.3