You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/04/03 21:29:22 UTC
[incubator-nuttx] 02/03: arch/arm/src/stm32/stm32_pwm.h: fix
nxstyle issues
This is an automated email from the ASF dual-hosted git repository.
gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit ae31b1f92684451e759f6fac0db5e4174bbf17ce
Author: raiden00pl <ra...@gmail.com>
AuthorDate: Fri Apr 3 22:50:07 2020 +0200
arch/arm/src/stm32/stm32_pwm.h: fix nxstyle issues
---
arch/arm/src/stm32/stm32_pwm.h | 27 +++++++++++++++++++--------
1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/arch/arm/src/stm32/stm32_pwm.h b/arch/arm/src/stm32/stm32_pwm.h
index a5549f0..1ea5977 100644
--- a/arch/arm/src/stm32/stm32_pwm.h
+++ b/arch/arm/src/stm32/stm32_pwm.h
@@ -55,14 +55,22 @@
#include "chip.h"
+#ifdef CONFIG_STM32_PWM
+# include <arch/board/board.h>
+# include "hardware/stm32_tim.h"
+#endif
+
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
+
/* Configuration ********************************************************************/
+
/* Timer devices may be used for different purposes. One special purpose is
- * to generate modulated outputs for such things as motor control. If CONFIG_STM32_TIMn
- * is defined then the CONFIG_STM32_TIMn_PWM must also be defined to indicate that
- * timer "n" is intended to be used for pulsed output signal generation.
+ * to generate modulated outputs for such things as motor control.
+ * If CONFIG_STM32_TIMn is defined then the CONFIG_STM32_TIMn_PWM must also be
+ * defined to indicate that timer "n" is intended to be used for pulsed output
+ * signal generation.
*/
#ifndef CONFIG_STM32_TIM1
@@ -120,9 +128,6 @@
#ifdef CONFIG_STM32_PWM
-#include <arch/board/board.h>
-#include "hardware/stm32_tim.h"
-
/* PWM driver channels configuration */
#ifdef CONFIG_STM32_PWM_MULTICHAN
@@ -1013,13 +1018,18 @@ enum stm32_pwm_output_e
STM32_PWM_OUT3 = (1 << 4),
STM32_PWM_OUT3N = (1 << 5),
STM32_PWM_OUT4 = (1 << 6),
+
/* 1 << 7 reserved - no complementary output for CH4 */
+
#ifdef HAVE_IP_TIMERS_V2
/* Only available inside micro */
STM32_PWM_OUT5 = (1 << 8),
+
/* 1 << 9 reserved - no complementary output for CH5 */
+
STM32_PWM_OUT6 = (1 << 10),
+
/* 1 << 11 reserved - no complementary output for CH6 */
#endif
};
@@ -1072,7 +1082,8 @@ struct stm32_pwm_ops_s
/* Enable outputs */
- int (*outputs_enable)(FAR struct pwm_lowerhalf_s *dev, uint16_t outputs, bool state);
+ int (*outputs_enable)(FAR struct pwm_lowerhalf_s *dev, uint16_t outputs,
+ bool state);
/* Software update */
@@ -1125,7 +1136,7 @@ extern "C"
#endif
/************************************************************************************
- * Public Functions
+ * Public Function Prototypes
************************************************************************************/
/************************************************************************************