diff options
author | Joey Castillo <jose.castillo@gmail.com> | 2021-08-29 17:40:44 -0400 |
---|---|---|
committer | Joey Castillo <jose.castillo@gmail.com> | 2021-08-29 17:40:44 -0400 |
commit | 6353d25d46979efed36c50ec186c8006f266d78a (patch) | |
tree | 37725afdd72ffb87f6e2965aaff122457b1f0738 /watch-library/watch/watch_led.h | |
parent | 7dc4b0fdc60b6240515d6c4143a5310b343dc8a5 (diff) | |
download | Sensor-Watch-6353d25d46979efed36c50ec186c8006f266d78a.tar.gz Sensor-Watch-6353d25d46979efed36c50ec186c8006f266d78a.tar.bz2 Sensor-Watch-6353d25d46979efed36c50ec186c8006f266d78a.zip |
big PWM refactor: drive both LEDs and buzzer from TCC
Diffstat (limited to 'watch-library/watch/watch_led.h')
-rw-r--r-- | watch-library/watch/watch_led.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/watch-library/watch/watch_led.h b/watch-library/watch/watch_led.h index 04b6e5fa..5dedadf3 100644 --- a/watch-library/watch/watch_led.h +++ b/watch-library/watch/watch_led.h @@ -43,15 +43,16 @@ void watch_enable_led(bool pwm); /** @brief Disables the LEDs. * @param pwm if true, disables the PWM output. If false, disables the digital outputs. + * @note If pwm is true, this method will also disable the buzzer, since the buzzer and LED both make use of + * the same peripheral to drive their PWM behavior. */ void watch_disable_led(bool pwm); /** @brief Sets the LED to a custom color by modulating each output's duty cycle. - * @param red The red value. - * @param green The green value. - * @note still working on this, 0-65535 works now but these values may change. + * @param red The red value from 0-255. + * @param green The green value from 0-255. */ -void watch_set_led_color(uint16_t red, uint16_t green); +void watch_set_led_color(uint8_t red, uint8_t green); /** @brief Sets the red LED to full brightness, and turns the green LED off. * @note Of the two LED's in the RG bi-color LED, the red LED is the less power-efficient one (~4.5 mA). |