git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5557 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2013-04-07 10:19:13 +00:00
parent 00d0a134ec
commit 6624532a42
2 changed files with 20 additions and 9 deletions

View File

@ -416,8 +416,8 @@ struct PWMDriver {
* @notapi * @notapi
*/ */
#define pwm_lld_is_channel_enabled(pwmp, channel) \ #define pwm_lld_is_channel_enabled(pwmp, channel) \
((pwmp->tim->CCR[channel] == 0) && \ ((pwmp->tim->CCR[channel] != 0) || \
((pwmp->tim->DIER & (2 << channel)) == 0)) ((pwmp->tim->DIER & (2 << channel)) != 0))
/*===========================================================================*/ /*===========================================================================*/
/* External declarations. */ /* External declarations. */

View File

@ -45,11 +45,11 @@
* @{ * @{
*/ */
/** /**
* @brief XXX driver enable switch. * @brief PWM driver enable switch.
* @details If set to @p TRUE the support for XXX1 is included. * @details If set to @p TRUE the support for PWM1 is included.
*/ */
#if !defined(PLATFORM_XXX_USE_XXX1) || defined(__DOXYGEN__) #if !defined(PLATFORM_PWM_USE_PWM1) || defined(__DOXYGEN__)
#define PLATFORM_XXX_USE_XXX1 FALSE #define PLATFORM_PWM_USE_PWM1 FALSE
#endif #endif
/** @} */ /** @} */
@ -154,12 +154,23 @@ struct PWMDriver {
/* Driver macros. */ /* Driver macros. */
/*===========================================================================*/ /*===========================================================================*/
/**
* @brief Returns a PWM channel status.
* @pre The PWM unit must have been activated using @p pwmStart().
*
* @param[in] pwmp pointer to a @p PWMDriver object
* @param[in] channel PWM channel identifier (0...PWM_CHANNELS-1)
*
* @notapi
*/
#define pwm_lld_is_channel_enabled(pwmp, channel) FALSE
/*===========================================================================*/ /*===========================================================================*/
/* External declarations. */ /* External declarations. */
/*===========================================================================*/ /*===========================================================================*/
#if PLATFORM_XXX_USE_XXX1 && !defined(__DOXYGEN__) #if PLATFORM_PWM_USE_PWM1 && !defined(__DOXYGEN__)
extern XXXDriver XXXD1; extern PWMDriver PWMD1;
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus