git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5557 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
00d0a134ec
commit
6624532a42
|
@ -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. */
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
/**
|
/**
|
||||||
* @brief Number of PWM channels per PWM driver.
|
* @brief Number of PWM channels per PWM driver.
|
||||||
*/
|
*/
|
||||||
#define PWM_CHANNELS 4
|
#define PWM_CHANNELS 4
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver pre-compile time settings. */
|
/* Driver pre-compile time settings. */
|
||||||
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue