diff options
| author | (no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2006-08-03 21:18:17 +0000 | 
|---|---|---|
| committer | (no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2006-08-03 21:18:17 +0000 | 
| commit | 7822203b081c7b56911812c1af18c07f84451aa4 (patch) | |
| tree | 82372cebf5c5aa1385f9064b35cf64b3e790eb82 | |
| parent | b6989b35f5d3a3d2bbb464145430224ef669aea2 (diff) | |
- fix prototype in header
- make sure we disable SSC before enabling PWM
git-svn-id: https://svn.openpcd.org:2342/trunk@76 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
| -rw-r--r-- | openpcd/firmware/src/pwm.c | 3 | ||||
| -rw-r--r-- | openpcd/firmware/src/pwm.h | 2 | 
2 files changed, 4 insertions, 1 deletions
| diff --git a/openpcd/firmware/src/pwm.c b/openpcd/firmware/src/pwm.c index fd11e7c..9d79b61 100644 --- a/openpcd/firmware/src/pwm.c +++ b/openpcd/firmware/src/pwm.c @@ -101,6 +101,9 @@ void pwm_duty_set_percent(int channel, u_int16_t duty)  void pwm_init(void)  { +	/* IMPORTANT: Disable PA17 (SSC TD) output */ +	AT91F_PIO_CfgInput(AT91C_BASE_PIOA, AT91C_PIO_PA17); +  	/* Set PA0 to Peripheral A (PWM0) */  	AT91F_PIO_CfgPeriph(AT91C_BASE_PIOA, AT91C_PA0_PWM0, 0); diff --git a/openpcd/firmware/src/pwm.h b/openpcd/firmware/src/pwm.h index c41d74a..8836c32 100644 --- a/openpcd/firmware/src/pwm.h +++ b/openpcd/firmware/src/pwm.h @@ -4,7 +4,7 @@  extern void pwm_freq_set(int channel, u_int32_t freq);  extern void pwm_start(int channel);  extern void pwm_stop(int channel); -extern void pwm_duty(int channel, u_int16_t duty); +extern void pwm_duty_set_percent(int channel, u_int16_t duty);  extern void pwm_init(void);  extern void pwm_fini(void); | 
