aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/AVR/pwm_lld.h
diff options
context:
space:
mode:
authorutzig <utzig@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-11-17 18:19:57 +0000
committerutzig <utzig@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-11-17 18:19:57 +0000
commit0d4751a2aece4ea63e493331787bf5a98da716c2 (patch)
tree82806ee1d1fb7ca9fa1010583492f32047a1b821 /os/hal/ports/AVR/pwm_lld.h
parent0f253d11b622ca6a0408f7edbc26ec6553f34178 (diff)
downloadChibiOS-0d4751a2aece4ea63e493331787bf5a98da716c2.tar.gz
ChibiOS-0d4751a2aece4ea63e493331787bf5a98da716c2.tar.bz2
ChibiOS-0d4751a2aece4ea63e493331787bf5a98da716c2.zip
[AVR] Updated PWM driver for 3.0 compatibility
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7519 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/AVR/pwm_lld.h')
-rw-r--r--os/hal/ports/AVR/pwm_lld.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/os/hal/ports/AVR/pwm_lld.h b/os/hal/ports/AVR/pwm_lld.h
index eb72f05da..e11ac6a10 100644
--- a/os/hal/ports/AVR/pwm_lld.h
+++ b/os/hal/ports/AVR/pwm_lld.h
@@ -90,6 +90,11 @@ typedef uint8_t pwmmode_t;
typedef uint8_t pwmchannel_t;
/**
+ * @brief Type of a channels mask.
+ */
+typedef uint8_t pwmchnmsk_t;
+
+/**
* @brief PWM counter type.
*/
typedef uint16_t pwmcnt_t;
@@ -162,6 +167,14 @@ struct PWMDriver {
* @brief Current PWM period in ticks.
*/
pwmcnt_t period;
+ /**
+ * @brief Mask of the enabled channels.
+ */
+ pwmchnmsk_t enabled;
+ /**
+ * @brief Number of channels in this instance.
+ */
+ pwmchannel_t channels;
#if defined(PWM_DRIVER_EXT_FIELDS)
PWM_DRIVER_EXT_FIELDS
#endif
@@ -203,6 +216,12 @@ extern "C" {
pwmchannel_t channel,
pwmcnt_t width);
void pwm_lld_disable_channel(PWMDriver *pwmp, pwmchannel_t channel);
+ void pwm_lld_enable_periodic_notification(PWMDriver *pwmp);
+ void pwm_lld_disable_periodic_notification(PWMDriver *pwmp);
+ void pwm_lld_enable_channel_notification(PWMDriver *pwmp,
+ pwmchannel_t channel);
+ void pwm_lld_disable_channel_notification(PWMDriver *pwmp,
+ pwmchannel_t channel);
#ifdef __cplusplus
}
#endif