From c0090716995447bd59954c8a7e24cd5c20598f7a Mon Sep 17 00:00:00 2001 From: joeycastillo Date: Thu, 27 Jan 2022 15:47:25 +0000 Subject: deploy: 29fa6052831f8d26815405d4652b5799e3c74147 --- watch_8h.html | 153 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 watch_8h.html (limited to 'watch_8h.html') diff --git a/watch_8h.html b/watch_8h.html new file mode 100644 index 00000000..b3432638 --- /dev/null +++ b/watch_8h.html @@ -0,0 +1,153 @@ + + + + + + + +Sensor Watch: watch-library/shared/watch/watch.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
Sensor Watch +  0.0.0 +
+
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
watch.h File Reference
+
+
+
#include <stdint.h>
+#include <stdbool.h>
+#include "driver_init.h"
+#include "watch_app.h"
+#include "watch_rtc.h"
+#include "watch_slcd.h"
+#include "watch_extint.h"
+#include "watch_led.h"
+#include "watch_buzzer.h"
+#include "watch_adc.h"
+#include "watch_gpio.h"
+#include "watch_i2c.h"
+#include "watch_spi.h"
+#include "watch_uart.h"
+#include "watch_deepsleep.h"
+#include "watch_private.h"
+
+

Go to the source code of this file.

+ + + + + + + + +

+Functions

bool watch_is_battery_low (void)
 Returns true when the battery voltage dips below 2.5V. More...
 
bool watch_is_buzzer_or_led_enabled (void)
 Returns true if either the buzzer or the LED driver is enabled. More...
 
+

Function Documentation

+ +

◆ watch_is_battery_low()

+ +
+
+ + + + + + + + +
bool watch_is_battery_low (void )
+
+ +

Returns true when the battery voltage dips below 2.5V.

+

A CR2016 battery will have a nominal voltage between 2.9 and 3 volts for most of its lifespan. Once the battery discharges to about 60%, the voltage will drift slightly lower; this may manifest as a dimmer LED. By the time the battery voltage has fallen to 2.5 volts, it will have probably less than 10% of its capacity remaining, and you can expect the voltage to drop relatively quickly as the battery dies.

+ +
+
+ +

◆ watch_is_buzzer_or_led_enabled()

+ +
+
+ + + + + + + + +
bool watch_is_buzzer_or_led_enabled (void )
+
+ +

Returns true if either the buzzer or the LED driver is enabled.

+

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.

+ +
+
+
+ + + + -- cgit v1.2.3