diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-03-31 16:59:22 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-03-31 16:59:22 -0600 |
commit | 62e6ca593af8f98726c9760ad7dd4c65d90edff9 (patch) | |
tree | fb60e22e61d85691120bbf5386ec1fc3ad9bd23a /nuttx/configs/stm3220g-eval/src | |
parent | 920edab8e265baef8bcaa3128822f7cc41dd1ad3 (diff) | |
download | px4-nuttx-62e6ca593af8f98726c9760ad7dd4c65d90edff9.tar.gz px4-nuttx-62e6ca593af8f98726c9760ad7dd4c65d90edff9.tar.bz2 px4-nuttx-62e6ca593af8f98726c9760ad7dd4c65d90edff9.zip |
Rename pwm_devinit() to board_pwm_setup(). Add CONFIG_BOARDCTL_PWMTEST that will enable calling board_pwm_setup() from boardctl(). Replace calls to pwm_devinit() in apps/examples/pwm with calls to boardctl(). In all configurations that enable the apps/examples/pwm test, make sure that boardctl() suppoprt is properly enabled.
Diffstat (limited to 'nuttx/configs/stm3220g-eval/src')
-rw-r--r-- | nuttx/configs/stm3220g-eval/src/stm32_pwm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/nuttx/configs/stm3220g-eval/src/stm32_pwm.c b/nuttx/configs/stm3220g-eval/src/stm32_pwm.c index adbce846d..a519ac9e9 100644 --- a/nuttx/configs/stm3220g-eval/src/stm32_pwm.c +++ b/nuttx/configs/stm3220g-eval/src/stm32_pwm.c @@ -1,7 +1,7 @@ /************************************************************************************ * configs/stm3220g-eval/src/stm32_pwm.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -42,7 +42,9 @@ #include <errno.h> #include <debug.h> +#include <nuttx/board.h> #include <nuttx/pwm.h> + #include <arch/board/board.h> #include "chip.h" @@ -72,7 +74,7 @@ ************************************************************************************/ /************************************************************************************ - * Name: pwm_devinit + * Name: board_pwm_setup * * Description: * All STM32 architectures must provide the following interface to work with @@ -80,7 +82,7 @@ * ************************************************************************************/ -int pwm_devinit(void) +int board_pwm_setup(void) { static bool initialized = false; struct pwm_lowerhalf_s *pwm; |