summaryrefslogtreecommitdiffstats
path: root/watch-library/watch/watch_private.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_private.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_private.c')
-rw-r--r--watch-library/watch/watch_private.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/watch-library/watch/watch_private.c b/watch-library/watch/watch_private.c
index 8dfd10f9..dd3cba0b 100644
--- a/watch-library/watch/watch_private.c
+++ b/watch-library/watch/watch_private.c
@@ -93,18 +93,18 @@ void _watch_enable_tcc() {
// get the LED working. Almost any period will do, tho it should be below 20000 (i.e. 50 Hz) to avoid flickering.
hri_tcc_write_PER_reg(TCC0, 4096);
// Set the duty cycle of all pins to 0: LED's off, buzzer not buzzing.
- hri_tcc_write_CC_reg(TCC0, 1, 0);
- hri_tcc_write_CC_reg(TCC0, 2, 0);
- hri_tcc_write_CC_reg(TCC0, 3, 0);
+ hri_tcc_write_CC_reg(TCC0, WATCH_BUZZER_TCC_CHANNEL, 0);
+ hri_tcc_write_CC_reg(TCC0, WATCH_RED_TCC_CHANNEL, 0);
+ hri_tcc_write_CC_reg(TCC0, WATCH_GREEN_TCC_CHANNEL, 0);
// Enable the TCC
hri_tcc_set_CTRLA_ENABLE_bit(TCC0);
hri_tcc_wait_for_sync(TCC0, TCC_SYNCBUSY_ENABLE);
// enable LED PWM pins (the LED driver assumes if the TCC is on, the pins are enabled)
gpio_set_pin_direction(RED, GPIO_DIRECTION_OUT);
- gpio_set_pin_function(RED, PINMUX_PA20F_TCC0_WO6);
+ gpio_set_pin_function(RED, WATCH_RED_TCC_PINMUX);
gpio_set_pin_direction(GREEN, GPIO_DIRECTION_OUT);
- gpio_set_pin_function(GREEN, PINMUX_PA21F_TCC0_WO7);
+ gpio_set_pin_function(GREEN, WATCH_GREEN_TCC_PINMUX);
}
void _watch_disable_tcc() {