diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-01-10 21:19:12 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-01-10 21:19:12 +0000 |
commit | b45972d006d34d588ef0bde2ebffb2de5843b0fa (patch) | |
tree | dd1caee62e06d30b925b56291bd3c1068234819e /nuttx/arch/arm/src/stm32/stm32_pwm.c | |
parent | 12d52c812dac2668031e68a783e13fd7f8b49510 (diff) | |
download | px4-nuttx-b45972d006d34d588ef0bde2ebffb2de5843b0fa.tar.gz px4-nuttx-b45972d006d34d588ef0bde2ebffb2de5843b0fa.tar.bz2 px4-nuttx-b45972d006d34d588ef0bde2ebffb2de5843b0fa.zip |
Fix CAN callback argument
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4289 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/stm32/stm32_pwm.c')
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_pwm.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_pwm.c b/nuttx/arch/arm/src/stm32/stm32_pwm.c index 7be44642d..83f996761 100644 --- a/nuttx/arch/arm/src/stm32/stm32_pwm.c +++ b/nuttx/arch/arm/src/stm32/stm32_pwm.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/stm32/stm32_pwm.c * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -108,16 +108,28 @@ /* Debug ********************************************************************/ /* Non-standard debug that may be enabled just for testing PWM */ +#ifndef CONFIG_DEBUG +# undef CONFIG_DEBUG_PWM +#endif + #ifdef CONFIG_DEBUG_PWM -# define pwmdbg dbg -# define pwmvdbg vdbg -# define pwmlldbg lldbg -# define pwmllvdbg llvdbg +# define pwmdbg dbg +# define pwmlldbg lldbg +# ifdef CONFIG_DEBUG_VERBOSE +# define pwmvdbg vdbg +# define pwmllvdbg llvdbg +# define pwm_dumpgpio(p,m) stm32_dumpgpio(p,m) +# else +# define pwmlldbg(x...) +# define pwmllvdbg(x...) +# define pwm_dumpgpio(p,m) +# endif #else # define pwmdbg(x...) -# define pwmvdbg(x...) # define pwmlldbg(x...) +# define pwmvdbg(x...) # define pwmllvdbg(x...) +# define pwm_dumpgpio(p,m) #endif /**************************************************************************** @@ -813,7 +825,7 @@ static int pwm_timer(FAR struct stm32_pwmtimer_s *priv, #if defined(CONFIG_STM32_TIM1_PWM) || defined(CONFIG_STM32_TIM8_PWM) if (priv->timtype == TIMTYPE_ADVANCED) { - /* Reset output N polarity level, output N state, output compre state, + /* Reset output N polarity level, output N state, output compare state, * output compare N idle state. */ @@ -979,6 +991,7 @@ static int pwm_setup(FAR struct pwm_lowerhalf_s *dev) /* Configure the PWM output pin, but do not start the timer yet */ stm32_configgpio(priv->pincfg); + pwm_dumpgpio(priv->pincfg, "PWM setup"); // REMOVE ME return OK; } |