arch/arm/src/stm32h7/Kconfig: fix warnings;

arch/arm/src/stm32h7/stm32_tim.c: don't use hardcoded UIF interrupt
This commit is contained in:
Mateusz Szafoni
2019-05-06 06:45:16 -06:00
committed by Gregory Nutt
parent 1c084cef78
commit 21feca2a46
2 changed files with 58 additions and 30 deletions
+55 -27
View File
@@ -1117,10 +1117,10 @@ if !STM32H7_PWM_MULTICHAN
config STM32H7_TIM1_CHANNEL config STM32H7_TIM1_CHANNEL
int "TIM1 PWM Output Channel" int "TIM1 PWM Output Channel"
default 1 default 1
range 1 6 range 1 4
---help--- ---help---
If TIM1 is enabled for PWM usage, you also need specifies the timer output If TIM1 is enabled for PWM usage, you also need specifies the timer output
channel {1,..,6} channel {1,..,4}
config STM32H7_TIM1_CHMODE config STM32H7_TIM1_CHMODE
int "TIM1 Channel Mode" int "TIM1 Channel Mode"
@@ -1858,10 +1858,10 @@ if !STM32H7_PWM_MULTICHAN
config STM32H7_TIM8_CHANNEL config STM32H7_TIM8_CHANNEL
int "TIM8 PWM Output Channel" int "TIM8 PWM Output Channel"
default 1 default 1
range 1 6 range 1 4
---help--- ---help---
If TIM8 is enabled for PWM usage, you also need specifies the timer output If TIM8 is enabled for PWM usage, you also need specifies the timer output
channel {1,..,6} channel {1,..,4}
config STM32H7_TIM8_CHMODE config STM32H7_TIM8_CHMODE
int "TIM8 Channel Mode" int "TIM8 Channel Mode"
@@ -1973,12 +1973,18 @@ config STM32H7_TIM13_PWM
is defined then THIS following may also be defined to indicate that is defined then THIS following may also be defined to indicate that
the timer is intended to be used for pulsed output modulation. the timer is intended to be used for pulsed output modulation.
config STM32H7_TIM13_CHANNEL
default 1
depends on STM32H7_TIM13_PWM
if STM32H7_TIM13_PWM if STM32H7_TIM13_PWM
if !STM32H7_PWM_MULTICHAN
config STM32H7_TIM13_CHANNEL
int "TIM13 PWM Output Channel"
default 1
range 1 1
---help---
If TIM13 is enabled for PWM usage, you also need specifies the timer output
channel {1}
config STM32H7_TIM13_CHMODE config STM32H7_TIM13_CHMODE
int "TIM13 Channel Mode" int "TIM13 Channel Mode"
default 0 default 0
@@ -1986,6 +1992,8 @@ config STM32H7_TIM13_CHMODE
---help--- ---help---
Specifies the channel mode. Specifies the channel mode.
endif # !STM32H7_PWM_MULTICHAN
endif # STM32H7_TIM13_PWM endif # STM32H7_TIM13_PWM
config STM32H7_TIM14_PWM config STM32H7_TIM14_PWM
@@ -2001,12 +2009,18 @@ config STM32H7_TIM14_PWM
is defined then THIS following may also be defined to indicate that is defined then THIS following may also be defined to indicate that
the timer is intended to be used for pulsed output modulation. the timer is intended to be used for pulsed output modulation.
config STM32H7_TIM14_CHANNEL
default 1
depends on STM32H7_TIM14_PWM
if STM32H7_TIM14_PWM if STM32H7_TIM14_PWM
if !STM32H7_PWM_MULTICHAN
config STM32_TIM14_CHANNEL
int "TIM14 PWM Output Channel"
default 1
range 1 1
---help---
If TIM14 is enabled for PWM usage, you also need specifies the timer output
channel {1}
config STM32H7_TIM14_CHMODE config STM32H7_TIM14_CHMODE
int "TIM14 Channel Mode" int "TIM14 Channel Mode"
default 0 default 0
@@ -2014,6 +2028,8 @@ config STM32H7_TIM14_CHMODE
---help--- ---help---
Specifies the channel mode. Specifies the channel mode.
endif # !STM32H7_PWM_MULTICHAN
endif # STM32H7_TIM14_PWM endif # STM32H7_TIM14_PWM
config STM32H7_TIM15_PWM config STM32H7_TIM15_PWM
@@ -2072,7 +2088,7 @@ config STM32H7_TIM15_CH2MODE
Specifies the channel mode. Specifies the channel mode.
config STM32H7_TIM15_CH2OUT config STM32H7_TIM15_CH2OUT
bool "TIM12 Channel 2 Output" bool "TIM15 Channel 2 Output"
default n default n
---help--- ---help---
Enables channel 2 output. Enables channel 2 output.
@@ -2084,7 +2100,7 @@ endif # STM32H7_PWM_MULTICHAN
if !STM32H7_PWM_MULTICHAN if !STM32H7_PWM_MULTICHAN
config STM32H7_TIM15_CHANNEL config STM32H7_TIM15_CHANNEL
int "TIM12 PWM Output Channel" int "TIM15 PWM Output Channel"
default 1 default 1
range 1 2 range 1 2
---help--- ---help---
@@ -2115,16 +2131,18 @@ config STM32H7_TIM16_PWM
is defined then THIS following may also be defined to indicate that is defined then THIS following may also be defined to indicate that
the timer is intended to be used for pulsed output modulation. the timer is intended to be used for pulsed output modulation.
config STM32H7_TIM16_CHANNEL
default 1
depends on STM32H7_TIM16_PWM
config STM32H7_TIM16_CHANNEL
default 1
depends on STM32H7_TIM16_PWM
if STM32H7_TIM16_PWM if STM32H7_TIM16_PWM
if !STM32H7_PWM_MULTICHAN
config STM32_TIM16_CHANNEL
int "TIM16 PWM Output Channel"
default 1
range 1 1
---help---
If TIM16 is enabled for PWM usage, you also need specifies the timer output
channel {1}
config STM32H7_TIM16_CHMODE config STM32H7_TIM16_CHMODE
int "TIM16 Channel Mode" int "TIM16 Channel Mode"
default 0 default 0
@@ -2132,6 +2150,8 @@ config STM32H7_TIM16_CHMODE
---help--- ---help---
Specifies the channel mode. Specifies the channel mode.
endif # !STM32H7_PWM_MULTICHAN
endif # STM32H7_TIM16_PWM endif # STM32H7_TIM16_PWM
config STM32H7_TIM17_PWM config STM32H7_TIM17_PWM
@@ -2147,19 +2167,27 @@ config STM32H7_TIM17_PWM
is defined then THIS following may also be defined to indicate that is defined then THIS following may also be defined to indicate that
the timer is intended to be used for pulsed output modulation. the timer is intended to be used for pulsed output modulation.
config STM32H7_TIM17_CHANNEL
default 1
depends on STM32H7_TIM17_PWM
if STM32H7_TIM17_PWM if STM32H7_TIM17_PWM
if !STM32H7_PWM_MULTICHAN
config STM32_TIM17_CHANNEL
int "TIM17 PWM Output Channel"
default 1
range 1 1
---help---
If TIM17 is enabled for PWM usage, you also need specifies the timer output
channel {1}
config STM32H7_TIM17_CHMODE config STM32H7_TIM17_CHMODE
int "TIM14 Channel Mode" int "TIM17 Channel Mode"
default 0 default 0
range 0 5 range 0 5
---help--- ---help---
Specifies the channel mode. Specifies the channel mode.
endif # !STM32H7_PWM_MULTICHAN
endif # STM32H7_TIM17_PWM endif # STM32H7_TIM17_PWM
config STM32H7_PWM_MULTICHAN config STM32H7_PWM_MULTICHAN
+3 -3
View File
@@ -782,18 +782,18 @@ static int stm32_tim_setisr(FAR struct stm32_tim_dev_s *dev,
static void stm32_tim_enableint(FAR struct stm32_tim_dev_s *dev, int source) static void stm32_tim_enableint(FAR struct stm32_tim_dev_s *dev, int source)
{ {
DEBUGASSERT(dev != NULL); DEBUGASSERT(dev != NULL);
stm32_modifyreg16(dev, STM32_BTIM_DIER_OFFSET, 0, ATIM_DIER_UIE); stm32_modifyreg16(dev, STM32_BTIM_DIER_OFFSET, 0, source);
} }
static void stm32_tim_disableint(FAR struct stm32_tim_dev_s *dev, int source) static void stm32_tim_disableint(FAR struct stm32_tim_dev_s *dev, int source)
{ {
DEBUGASSERT(dev != NULL); DEBUGASSERT(dev != NULL);
stm32_modifyreg16(dev, STM32_BTIM_DIER_OFFSET, ATIM_DIER_UIE, 0); stm32_modifyreg16(dev, STM32_BTIM_DIER_OFFSET, source, 0);
} }
static void stm32_tim_ackint(FAR struct stm32_tim_dev_s *dev, int source) static void stm32_tim_ackint(FAR struct stm32_tim_dev_s *dev, int source)
{ {
stm32_putreg16(dev, STM32_BTIM_SR_OFFSET, ~ATIM_SR_UIF); stm32_putreg16(dev, STM32_BTIM_SR_OFFSET, ~source);
} }
/**************************************************************************** /****************************************************************************