summaryrefslogtreecommitdiffstats
path: root/watch-library/watch/watch_buzzer.c
diff options
context:
space:
mode:
authorJoey Castillo <jose.castillo@gmail.com>2021-09-13 16:43:35 -0400
committerJoey Castillo <jose.castillo@gmail.com>2021-09-13 16:44:07 -0400
commit5a53916f0e51f02aab6d892c87310e5730abce5c (patch)
tree790945ca3e388417685dde5d2f100f3d3fdba83f /watch-library/watch/watch_buzzer.c
parent5cd6b1afc7cacbe3479fd57305ce71ac25e42759 (diff)
downloadSensor-Watch-5a53916f0e51f02aab6d892c87310e5730abce5c.tar.gz
Sensor-Watch-5a53916f0e51f02aab6d892c87310e5730abce5c.tar.bz2
Sensor-Watch-5a53916f0e51f02aab6d892c87310e5730abce5c.zip
first steps toward supporting alternate board pinouts
Diffstat (limited to 'watch-library/watch/watch_buzzer.c')
-rw-r--r--watch-library/watch/watch_buzzer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/watch-library/watch/watch_buzzer.c b/watch-library/watch/watch_buzzer.c
index c6c89a0e..9cb37393 100644
--- a/watch-library/watch/watch_buzzer.c
+++ b/watch-library/watch/watch_buzzer.c
@@ -37,7 +37,7 @@ void watch_disable_buzzer() {
inline void watch_set_buzzer_on() {
gpio_set_pin_direction(BUZZER, GPIO_DIRECTION_OUT);
- gpio_set_pin_function(BUZZER, PINMUX_PA27F_TCC0_WO5);
+ gpio_set_pin_function(BUZZER, WATCH_BUZZER_TCC_PINMUX);
}
inline void watch_set_buzzer_off() {
@@ -54,7 +54,7 @@ void watch_buzzer_play_note(BuzzerNote note, uint16_t duration_ms) {
watch_set_buzzer_off();
} else {
hri_tcc_write_PERBUF_reg(TCC0, NotePeriods[note]);
- hri_tcc_write_CCBUF_reg(TCC0, 1, NotePeriods[note] / 2);
+ hri_tcc_write_CCBUF_reg(TCC0, WATCH_BUZZER_TCC_CHANNEL, NotePeriods[note] / 2);
watch_set_buzzer_on();
}
delay_ms(duration_ms);