diff options
-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); |