summaryrefslogtreecommitdiffstats
path: root/Smol Watch Project/My Project/watch-library/watch.h
diff options
context:
space:
mode:
authorJoey Castillo <jose.castillo@gmail.com>2021-05-02 13:07:51 -0400
committerJoey Castillo <jose.castillo@gmail.com>2021-05-02 13:07:51 -0400
commit9b381ef6ae36844e32452047b05b01f15893a2dc (patch)
tree8394c04b96f625dec258385c529f9aeae03d7483 /Smol Watch Project/My Project/watch-library/watch.h
parent68bada3006a627e704680c0161f597e585b37e7f (diff)
downloadSensor-Watch-9b381ef6ae36844e32452047b05b01f15893a2dc.tar.gz
Sensor-Watch-9b381ef6ae36844e32452047b05b01f15893a2dc.tar.bz2
Sensor-Watch-9b381ef6ae36844e32452047b05b01f15893a2dc.zip
WIP timer wakeup stuff
Diffstat (limited to 'Smol Watch Project/My Project/watch-library/watch.h')
-rw-r--r--Smol Watch Project/My Project/watch-library/watch.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/Smol Watch Project/My Project/watch-library/watch.h b/Smol Watch Project/My Project/watch-library/watch.h
index 876c240a..1b50251f 100644
--- a/Smol Watch Project/My Project/watch-library/watch.h
+++ b/Smol Watch Project/My Project/watch-library/watch.h
@@ -11,6 +11,9 @@
#include <stdint.h>
#include "hpl_calendar.h"
#include "hal_ext_irq.h"
+#include "hal_timer.h"
+
+typedef void (*watch_tick_cb)(void);
typedef struct Watch {
bool display_enabled;
@@ -37,15 +40,18 @@ void watch_disable_led(Watch *watch);
void watch_set_led_color(uint16_t red, uint16_t green);
void watch_set_led_red();
void watch_set_led_green();
+void watch_set_led_off();
void watch_enable_date_time(Watch *watch);
void watch_set_date_time(struct calendar_date_time date_time);
void watch_get_date_time(struct calendar_date_time *date_time);
+void watch_enable_tick(ext_irq_cb_t callback);
+
void watch_enable_analog(Watch *watch, const uint8_t pin);
-void watch_enable_interrupts(Watch *watch);
-void watch_register_interrupt_callback(Watch *watch, const uint32_t pin, ext_irq_cb_t callback);
+void watch_enable_buttons(Watch *watch);
+void watch_register_button_callback(Watch *watch, const uint32_t pin, ext_irq_cb_t callback);
void watch_enable_digital_input(const uint8_t pin);
void watch_enable_digital_output(const uint8_t pin);