From commits-return-6454-archive-asf-public=cust-asf.ponee.io@nuttx.apache.org Fri Apr 3 21:29:22 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id D143718067E for ; Fri, 3 Apr 2020 23:29:21 +0200 (CEST) Received: (qmail 46971 invoked by uid 500); 3 Apr 2020 21:29:21 -0000 Mailing-List: contact commits-help@nuttx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nuttx.apache.org Delivered-To: mailing list commits@nuttx.apache.org Received: (qmail 46939 invoked by uid 99); 3 Apr 2020 21:29:21 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Apr 2020 21:29:21 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id E8A3D81A0A; Fri, 3 Apr 2020 21:29:20 +0000 (UTC) Date: Fri, 03 Apr 2020 21:29:22 +0000 To: "commits@nuttx.apache.org" Subject: [incubator-nuttx] 02/03: arch/arm/src/stm32/stm32_pwm.h: fix nxstyle issues MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: gnutt@apache.org In-Reply-To: <158594936075.1751.13607324723146721178@gitbox.apache.org> References: <158594936075.1751.13607324723146721178@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: incubator-nuttx X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Rev: ae31b1f92684451e759f6fac0db5e4174bbf17ce X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20200403212920.E8A3D81A0A@gitbox.apache.org> 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 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 +# 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 -#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 ************************************************************************************/ /************************************************************************************