You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/10/12 17:52:50 UTC
[incubator-nuttx] branch master updated: freedom-k64f: Init PWM
only if enabled
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new cabaa10 freedom-k64f: Init PWM only if enabled
cabaa10 is described below
commit cabaa104285d6d45e2c9936312c3ccd5bbab8b4c
Author: Philippe Coval <rz...@users.sf.net>
AuthorDate: Mon Oct 12 16:47:26 2020 +0200
freedom-k64f: Init PWM only if enabled
Aligned to k28f.
Change-Id: I1b384ee69dd1b87268545ef6343acc63f29b2ae6
Forwarded: https://github.com/apache/incubator-nuttx/pull/1969
Signed-off-by: Philippe Coval <rz...@users.sf.net>
---
boards/arm/kinetis/freedom-k64f/src/k64_pwm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/boards/arm/kinetis/freedom-k64f/src/k64_pwm.c b/boards/arm/kinetis/freedom-k64f/src/k64_pwm.c
index f8f01ec..a4dadb3 100644
--- a/boards/arm/kinetis/freedom-k64f/src/k64_pwm.c
+++ b/boards/arm/kinetis/freedom-k64f/src/k64_pwm.c
@@ -77,6 +77,7 @@ int k64_pwm_setup(void)
if (!initialized)
{
+#ifdef CONFIG_KINETIS_FTM0_PWM
/* Call k64_pwminitialize() to get an instance of the PWM interface */
pwm = kinetis_pwminitialize(0);
@@ -86,6 +87,7 @@ int k64_pwm_setup(void)
return -ENODEV;
}
+#endif
/* Register the PWM driver at "/dev/pwm0" */
ret = pwm_register("/dev/pwm0", pwm);