279 Commits

Author SHA1 Message Date
joeycastillo
e4db48281d lol, GCLK3 is 1024 Hz in gossamer 2024-09-29 12:27:20 -04:00
joeycastillo
38f68fd165 clock SLCD frame counters from external crystal for more accurate tick/tock animation 2024-09-29 11:25:49 -04:00
joeycastillo
2ac3a1db2f fix sleep mode animation 2024-09-29 11:14:26 -04:00
joeycastillo
9bedee8e54 consistently use _t convention 2024-09-29 07:45:24 -04:00
joeycastillo
52578e5413 integrate utz, use DST-aware time zones instead of bare offsets 2024-09-23 23:27:10 -04:00
joeycastillo
f03a414ca8 use signed integers for UTC offset 2024-09-23 23:24:17 -04:00
joeycastillo
e1fa85faf7 fix typo 2024-09-22 15:04:34 -04:00
joeycastillo
e8cedeac6c rename enum, rearrange watch_tcc.h 2024-09-22 14:26:49 -04:00
joeycastillo
2e738db673 add buzzer volume control 2024-09-22 13:34:46 -04:00
joeycastillo
9274f532d2 improve API for text display 2024-09-19 08:42:07 -04:00
joeycastillo
dbf31b4e28 new name for irq handlers 2024-09-18 21:28:55 -04:00
joeycastillo
24598ec280 restore buzzer sequence functionality 2024-09-18 18:21:35 -04:00
joeycastillo
66f7a8802e remove dependency on Atmel HRI in storage module 2024-09-18 17:44:14 -04:00
joeycastillo
d0ca6a025a bring in deep sleep / external wake functions 2024-09-18 17:37:20 -04:00
joeycastillo
c02c89c880 clean up location of buzzer functions, notes 2024-09-18 17:25:41 -04:00
joeycastillo
422cea8ff6 simpler USB CDC with gossamer / yield (no need for TC0/TC1) 2024-09-18 17:14:06 -04:00
joeycastillo
da11c14684 use gossamer GPIO calls here 2024-09-18 17:13:11 -04:00
joeycastillo
2bbd78a99d remove ASF calls for TRNG 2024-09-18 17:09:20 -04:00
joeycastillo
7ee3eeac49 clean up location of some private functions 2024-09-18 17:05:10 -04:00
joeycastillo
6706452353 port ADC functions to gossamer 2024-09-18 16:10:12 -04:00
joeycastillo
9e32cbc523 port SLCD to gossamer, add new string display options 2024-09-18 16:04:55 -04:00
joeycastillo
ac88e2de8c port external interrupts to gossamer framework 2024-09-18 15:29:31 -04:00
joeycastillo
f5435d468d use #pragma once 2024-09-18 15:12:58 -04:00
joeycastillo
29d6ce42f1 bring in RTC functionality 2024-09-18 15:06:38 -04:00
joeycastillo
0585a1d0d8 consolidate buzzer and LED into TCC file 2024-09-18 14:53:46 -04:00
joeycastillo
29f020e207 port buzzer and LED functions to gossamer framework 2024-09-18 14:47:53 -04:00
joeycastillo
5ba64844e2 port GPIO functions to new framework 2024-09-18 14:33:07 -04:00
joeycastillo
02f7469400 remove ASF code, config 2024-09-18 13:56:49 -04:00
joeycastillo
9f73677883 let's begin 2024-09-18 13:47:35 -04:00
joeycastillo
0a82d16d4e remove watch_app 2024-09-18 13:19:52 -04:00
Matheus Afonso Martins Moreira
a9d503b807 Revert PR #470 - implement automatic DST toggling
The DST code has not yet been fully tested, the upcoming movement
refactor is upon us and it will integrate with the micro timezone
library anyway. Revert it so that next can be merged into main.

This reverts commit ac5bf8cfce67cdb5662aeea618c2eb9511f0d190, reversing
changes made to 5a8a49a8c77d6d5ba0f46f0e5b51dec2daba46db.
2024-09-17 17:28:32 -03:00
Matheus Afonso Martins Moreira
ac5bf8cfce Merge PR #470 - implement automatic DST toggling
Implements logic to automatically offset daylight saving time settings
when calculating timezone offsets. This should make the DST functions
work automatically with no need for user input in most cases.

Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/470
2024-09-08 13:41:52 -03:00
Matheus Afonso Martins Moreira
99586f8442 Merge PR #394 - keep LED lit while buttons held
Keeps the LED turned on while the user is interacting with the watch.

Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/394
2024-09-07 20:31:46 -03:00
Matheus Afonso Martins Moreira
a2e5417de9 Merge PR #461 - improve t/y special case docs
Fix a typo and make the documentation clearer.

Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/461
2024-09-03 00:28:25 -03:00
Matheus Afonso Martins Moreira
fa0cdef45b Merge PR #450 - sync after enabling RTC
According to the data sheet, writing to a Control A register's ENABLE
bit will trigger write synchronization and set SYNCBUSY's ENABLE bit
which will be automatically cleared by the hardware once the write
operation is complete.

It is necessary to wait until SYNCBUSY's ENABLE bit is clear.
Reading synchronized registers before that returns previous values.
Writing synchronized registers before that drops the write and generates
an error value in another register.

The data sheet recommends polling the ENABLE bit in this situation.

Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/450
References: SAM L22 Family Data Sheet §§ 14.3.2, 14.3.3, 14.3.4, 14.3.5
2024-08-30 16:47:47 -03:00
Matheus Afonso Martins Moreira
db4097bf84 Merge PR #426 - add temperature input to simulator
This patch enhances the Sensor Watch simulator with a temperature input
allowing users to simulate and test the temperature sensor.

Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/426
2024-08-30 16:47:47 -03:00
Matheus Afonso Martins Moreira
663cd725f8 Merge PR #434 - fix leap years
Improves handling of months in the Sensor Watch
by computing whether the given year is a leap year.

Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/434
2024-08-30 16:47:38 -03:00
Joseph Bryant
cae5d8a33f wait for RTC SYNCBUSY in watch_register_extwake_callback 2024-08-30 16:20:32 -03:00
David Volovskiy
fe259ee526 Comment change 2024-08-26 21:40:56 -04:00
David Volovskiy
9640f452cd Made the T and Y characters look more unique on the 4 and 6 position 2024-08-22 20:46:47 -04:00
David Volovskiy
09576807eb Made the days_in_month its own function 2024-08-10 07:40:52 -04:00
David Volovskiy
2824a62908 Bugfix on not registering the top of an hour 2024-08-04 09:53:04 -04:00
David Volovskiy
e50390b673 DST roll is now a global variable in watch_rtc 2024-08-03 10:07:57 -04:00
David Volovskiy
74421c7e65 Day roll back repeat fix 2024-08-03 09:39:02 -04:00
David Volovskiy
fa2907e098 Some more cleanup 2024-08-03 09:38:00 -04:00
Robert Masen
ccf99a9727 add temp input to simulator 2024-08-02 18:20:44 -05:00
David Volovskiy
149911e4ad Time now auto-updates with DST 2024-08-02 01:23:21 -04:00
James Haggerty
5f1a651732 Keep light on if interacting
This makes it possible to do a bunch of things without
having to keep touching the light button.

I don't really see any downside with this. If you want
the light to go off, just stop touching buttons.
2024-07-21 08:25:54 +10:00
joeycastillo
5ec3dca9e4 documentation fix 2024-07-10 06:56:49 -04:00
joeycastillo
ac5fb40730 remove dead code 2024-07-10 06:49:56 -04:00