diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-02-25 13:10:39 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-02-25 13:10:39 +0000 |
commit | ac598a7b1c4227cbffbbb1af449f2be21e6976a5 (patch) | |
tree | 95de89f1c5c7a443fb962102a4843ab9389b0357 /os/hal/templates/pwm_lld.c | |
parent | cced334724aec1f39d683adcda6984543095ba8c (diff) | |
download | ChibiOS-ac598a7b1c4227cbffbbb1af449f2be21e6976a5.tar.gz ChibiOS-ac598a7b1c4227cbffbbb1af449f2be21e6976a5.tar.bz2 ChibiOS-ac598a7b1c4227cbffbbb1af449f2be21e6976a5.zip |
LLD templates fixed.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5319 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/templates/pwm_lld.c')
-rw-r--r-- | os/hal/templates/pwm_lld.c | 41 |
1 files changed, 39 insertions, 2 deletions
diff --git a/os/hal/templates/pwm_lld.c b/os/hal/templates/pwm_lld.c index a849bf774..f8744e478 100644 --- a/os/hal/templates/pwm_lld.c +++ b/os/hal/templates/pwm_lld.c @@ -39,6 +39,13 @@ /* Driver exported variables. */
/*===========================================================================*/
+/**
+ * @brief PWM1 driver identifier.
+ */
+#if PLATFORM_PWM_USE_PWM1 || defined(__DOXYGEN__)
+PWMDriver PWMD1;
+#endif
+
/*===========================================================================*/
/* Driver local variables. */
/*===========================================================================*/
@@ -62,6 +69,10 @@ */
void pwm_lld_init(void) {
+#if PLATFORM_PWM_USE_PWM1
+ /* Driver initialization.*/
+ pwmObjectInit(&PWMD1);
+#endif /* PLATFORM_PWM_USE_PWM1 */
}
/**
@@ -74,9 +85,15 @@ void pwm_lld_init(void) { void pwm_lld_start(PWMDriver *pwmp) {
if (pwmp->state == PWM_STOP) {
- /* Clock activation.*/
+ /* Enables the pehipheral.*/
+#if PLATFORM_PWM_USE_PWM1
+ if (&PWMD1 == pwmp) {
+
+ }
+#endif /* PLATFORM_PWM_USE_PWM1 */
}
- /* Configuration.*/
+ /* Configures the peripheral.*/
+
}
/**
@@ -88,6 +105,16 @@ void pwm_lld_start(PWMDriver *pwmp) { */
void pwm_lld_stop(PWMDriver *pwmp) {
+ if (pwmp->state == PWM_READY) {
+ /* Resets the peripheral.*/
+
+ /* Disables the peripheral.*/
+#if PLATFORM_PWM_USE_PWM1
+ if (&PWMD1 == pwmp) {
+
+ }
+#endif /* PLATFORM_PWM_USE_PWM1 */
+ }
}
/**
@@ -108,6 +135,9 @@ void pwm_lld_stop(PWMDriver *pwmp) { */
void pwm_lld_change_period(PWMDriver *pwmp, pwmcnt_t period) {
+ (void)pwmp;
+ (void)period;
+
}
/**
@@ -128,6 +158,10 @@ void pwm_lld_enable_channel(PWMDriver *pwmp, pwmchannel_t channel,
pwmcnt_t width) {
+ (void)pwmp;
+ (void)channel;
+ (void)width;
+
}
/**
@@ -146,6 +180,9 @@ void pwm_lld_enable_channel(PWMDriver *pwmp, */
void pwm_lld_disable_channel(PWMDriver *pwmp, pwmchannel_t channel) {
+ (void)pwmp;
+ (void)channel;
+
}
#endif /* HAL_USE_PWM */
|