diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-08-05 10:30:37 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-08-05 10:30:37 +0000 |
commit | 04e29829b64a64a405125595dc371bd731766c68 (patch) | |
tree | ffaadc6d10888b4cbe7b574a5ccee2a26712662f /os/hal/include | |
parent | 31981145cf8b3d43848bfeb75d21ae5e0b2e0a81 (diff) | |
download | ChibiOS-04e29829b64a64a405125595dc371bd731766c68.tar.gz ChibiOS-04e29829b64a64a405125595dc371bd731766c68.tar.bz2 ChibiOS-04e29829b64a64a405125595dc371bd731766c68.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2114 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include')
-rw-r--r-- | os/hal/include/pwm.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/os/hal/include/pwm.h b/os/hal/include/pwm.h index 9b0043a21..562be26bc 100644 --- a/os/hal/include/pwm.h +++ b/os/hal/include/pwm.h @@ -78,6 +78,32 @@ typedef void (*pwmcallback_t)(void); /* Driver macros. */
/*===========================================================================*/
+/**
+ * @brief Enables a PWM channel.
+ * @details Programs (or reprograms) a PWM channel.
+ * @note This function has to be invoked from a lock zone.
+ *
+ * @param[in] pwmp pointer to a @p PWMDriver object
+ * @param[in] channel PWM channel identifier
+ * @param[in] width PWM pulse width as clock pulses number
+ */
+#define pwmEnableChannelI(pwmp, channel, width) { \
+ pwm_lld_enable_channel(pwmp, channel, width); \
+}
+
+/**
+ * @brief Disables a PWM channel.
+ * @details The channel is disabled and its output line returned to the
+ * idle state.
+ * @note This function has to be invoked from a lock zone.
+ *
+ * @param[in] pwmp pointer to a @p PWMDriver object
+ * @param[in] channel PWM channel identifier
+ */
+#define pwmDisableChannelI(pwmp, channel) { \
+ pwm_lld_disable_channel(pwmp, channel); \
+}
+
/*===========================================================================*/
/* External declarations. */
/*===========================================================================*/
|