add utility function to check if TCC is enabled
This commit is contained in:
parent
1a4612f259
commit
b341227797
@ -38,3 +38,7 @@ void SYSTEM_Handler(void) {
|
||||
bool watch_is_battery_low(void) {
|
||||
return battery_is_low;
|
||||
}
|
||||
|
||||
bool watch_is_buzzer_or_led_enabled(void){
|
||||
return hri_mclk_get_APBCMASK_TCC0_bit(MCLK);
|
||||
}
|
||||
|
@ -73,4 +73,11 @@
|
||||
*/
|
||||
bool watch_is_battery_low(void);
|
||||
|
||||
/** @brief Returns true if either the buzzer or the LED driver is enabled.
|
||||
* @details Both the buzzer and the LED use the TCC peripheral to drive their behavior. This function returns true if that
|
||||
* peripheral is enabled. You can use this function to determine whether you need to call the watch_disable_leds or
|
||||
* or watch_enable_buzzer functions before using these peripherals.
|
||||
*/
|
||||
bool watch_is_buzzer_or_led_enabled(void);
|
||||
|
||||
#endif /* WATCH_H_ */
|
Loading…
x
Reference in New Issue
Block a user