From 6594c65a77edf84f87ce918e823fb30f4c40b2ae Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Sun, 26 Mar 2017 09:30:23 +0200 Subject: [PATCH 1/3] stm32_comp.c: cosmetic --- arch/arm/src/stm32/stm32_comp.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/arm/src/stm32/stm32_comp.c b/arch/arm/src/stm32/stm32_comp.c index 9486c77f21..62400883e1 100644 --- a/arch/arm/src/stm32/stm32_comp.c +++ b/arch/arm/src/stm32/stm32_comp.c @@ -52,8 +52,6 @@ #include "stm32_gpio.h" #include "stm32_comp.h" -#ifdef CONFIG_STM32_COMP - /* Some COMP peripheral must be enabled */ /* Up to 7 comparators in STM32F2 Series */ @@ -195,7 +193,7 @@ static int stm32_compconfig(FAR struct stm32_comp_s *priv); static int stm32_compenable(FAR struct stm32_comp_s *priv, bool enable); /**************************************************************************** - * Private Types + * Private Data ****************************************************************************/ static const struct comp_ops_s g_compops = @@ -1036,5 +1034,3 @@ FAR struct comp_dev_s* stm32_compinitialize(int intf) #endif /* CONFIG_STM32_COMP2 || CONFIG_STM32_COMP4 || * CONFIG_STM32_COMP6 */ - -#endif /* CONFIG_STM32_COMP */ From c1090164f520d41d5fbcc79b020940e149abcf38 Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Sun, 26 Mar 2017 09:34:17 +0200 Subject: [PATCH 2/3] stm32/Kconfig: update COMP and OPAMP definitions --- arch/arm/src/stm32/Kconfig | 73 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 70 insertions(+), 3 deletions(-) diff --git a/arch/arm/src/stm32/Kconfig b/arch/arm/src/stm32/Kconfig index eba911dfc5..97f097fc65 100644 --- a/arch/arm/src/stm32/Kconfig +++ b/arch/arm/src/stm32/Kconfig @@ -1450,7 +1450,7 @@ config STM32_STM32F33XX select STM32_HAVE_COMP2 select STM32_HAVE_COMP4 select STM32_HAVE_COMP6 - select STM32_HAVE_OPAMP + select STM32_HAVE_OPAMP2 select STM32_HAVE_CCM select STM32_HAVE_TIM1 select STM32_HAVE_TIM15 @@ -1907,18 +1907,34 @@ config STM32_HAVE_CAN2 bool default n +config STM32_HAVE_COMP1 + bool + default n + config STM32_HAVE_COMP2 bool default n +config STM32_HAVE_COMP3 + bool + default n + config STM32_HAVE_COMP4 bool default n +config STM32_HAVE_COMP5 + bool + default n + config STM32_HAVE_COMP6 bool default n +config STM32_HAVE_COMP7 + bool + default n + config STM32_HAVE_DAC1 bool default n @@ -1971,7 +1987,19 @@ config STM32_HAVE_I2SPLL bool default n -config STM32_HAVE_OPAMP +config STM32_HAVE_OPAMP1 + bool + default n + +config STM32_HAVE_OPAMP2 + bool + default n + +config STM32_HAVE_OPAMP3 + bool + default n + +config STM32_HAVE_OPAMP4 bool default n @@ -2032,21 +2060,41 @@ config STM32_COMP default n depends on STM32_STM32L15XX +config STM32_COMP1 + bool "COMP1" + default n + depends on STM32_HAVE_COMP1 + config STM32_COMP2 bool "COMP2" default n depends on STM32_HAVE_COMP2 +config STM32_COMP3 + bool "COMP3" + default n + depends on STM32_HAVE_COMP3 + config STM32_COMP4 bool "COMP4" default n depends on STM32_HAVE_COMP4 +config STM32_COMP5 + bool "COMP5" + default n + depends on STM32_HAVE_COMP5 + config STM32_COMP6 bool "COMP6" default n depends on STM32_HAVE_COMP6 +config STM32_COMP7 + bool "COMP7" + default n + depends on STM32_HAVE_COMP6 + config STM32_BKP bool "BKP" default n @@ -2185,7 +2233,26 @@ config STM32_DMA2D config STM32_OPAMP bool "OPAMP" default n - depends on STM32_HAVE_OPAMP + +config STM32_OPAMP1 + bool "OPAMP1" + default n + depends on STM32_HAVE_OPAMP1 + +config STM32_OPAMP2 + bool "OPAMP2" + default n + depends on STM32_HAVE_OPAMP2 + +config STM32_OPAMP3 + bool "OPAMP3" + default n + depends on STM32_HAVE_OPAMP3 + +config STM32_OPAMP4 + bool "OPAMP4" + default n + depends on STM32_HAVE_OPAMP4 config STM32_OTGFS bool "OTG FS" From f3367233b6dd077a2082f8a0fb8a9cd747a0d8a7 Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Sun, 26 Mar 2017 09:36:53 +0200 Subject: [PATCH 3/3] stm32_comp.c: typo --- arch/arm/src/stm32/stm32_comp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/src/stm32/stm32_comp.c b/arch/arm/src/stm32/stm32_comp.c index 62400883e1..571e97f62d 100644 --- a/arch/arm/src/stm32/stm32_comp.c +++ b/arch/arm/src/stm32/stm32_comp.c @@ -53,7 +53,7 @@ #include "stm32_comp.h" /* Some COMP peripheral must be enabled */ -/* Up to 7 comparators in STM32F2 Series */ +/* Up to 7 comparators in STM32F3 Series */ #if defined(CONFIG_STM32_COMP1) || defined(CONFIG_STM32_COMP2) || \ defined(CONFIG_STM32_COMP3) || defined(CONFIG_STM32_COMP4) || \