From 595c3cb881c14a28d37a8a9a3e4aadc79285a673 Mon Sep 17 00:00:00 2001 From: joeycastillo Date: Sat, 5 Feb 2022 18:37:05 +0000 Subject: deploy: c74cacd34f68f2897fbd63e2ba90831f87cbad49 --- annotated.html | 27 ++- classes.html | 29 ++- dir_280ec1f3fe74f12cdd5c78898ed1ca3c.html | 61 ++++-- dir_3351a3556ab4b770be21f3a77a6d7b80.html | 31 +-- dir_f1a087a6659d970f5756e21fc1ac4961.html | 27 ++- doxygen.css | 58 +++++- files.html | 27 ++- globals.html | 32 ++- globals_func.html | 32 ++- group__adc.html | 61 +++--- group__app.html | 51 +++-- group__buttons.html | 63 +++--- group__buzzer.html | 239 +++++++++++----------- group__deepsleep.html | 63 +++--- group__gpio.html | 47 +++-- group__i2c.html | 53 +++-- group__led.html | 59 +++--- group__rtc.html | 83 ++++---- group__slcd.html | 99 +++++----- group__spi.html | 45 +++-- group__uart.html | 43 ++-- group__utility.html | 55 +++--- index.html | 31 ++- jquery.js | 4 +- menu.js | 86 +++++++- modules.html | 27 ++- search/all_0.html | 6 +- search/all_1.html | 6 +- search/all_1.js | 16 +- search/all_2.html | 6 +- search/all_2.js | 182 ++++++++--------- search/all_3.html | 6 +- search/all_3.js | 2 +- search/all_4.html | 6 +- search/all_4.js | 2 +- search/all_5.html | 6 +- search/all_5.js | 2 +- search/all_6.html | 6 +- search/all_6.js | 2 +- search/all_7.html | 6 +- search/all_7.js | 2 +- search/all_8.html | 6 +- search/all_8.js | 8 +- search/all_9.html | 6 +- search/all_9.js | 4 +- search/all_a.html | 6 +- search/all_a.js | 200 +++++++++---------- search/classes_0.html | 6 +- search/classes_0.js | 2 +- search/enums_0.html | 6 +- search/enums_0.js | 2 +- search/enums_1.html | 6 +- search/enums_1.js | 4 +- search/enumvalues_0.html | 6 +- search/enumvalues_0.js | 176 ++++++++--------- search/enumvalues_1.html | 6 +- search/enumvalues_1.js | 10 +- search/files_0.html | 6 +- search/files_0.js | 2 +- search/functions_0.html | 6 +- search/functions_0.js | 4 +- search/functions_1.html | 6 +- search/functions_1.js | 12 +- search/functions_2.html | 6 +- search/functions_2.js | 182 ++++++++--------- search/groups_0.html | 6 +- search/groups_0.js | 4 +- search/groups_1.html | 6 +- search/groups_1.js | 4 +- search/groups_2.html | 6 +- search/groups_2.js | 2 +- search/groups_3.html | 6 +- search/groups_3.js | 2 +- search/groups_4.html | 6 +- search/groups_4.js | 2 +- search/groups_5.html | 6 +- search/groups_5.js | 2 +- search/groups_6.html | 6 +- search/groups_6.js | 6 +- search/groups_7.html | 6 +- search/groups_7.js | 4 +- search/pages_0.html | 6 +- search/pages_0.js | 2 +- search/search.css | 12 +- search/search.js | 68 +++---- search/typedefs_0.html | 6 +- search/typedefs_0.js | 2 +- search/typedefs_1.html | 6 +- search/typedefs_1.js | 4 +- search/variables_0.html | 6 +- search/variables_0.js | 2 +- tabs.css | 2 +- unionwatch__date__time.html | 33 ++-- watch_8h.html | 37 ++-- watch_8h_source.html | 127 ++++++------ watch__adc_8h_source.html | 139 +++++++------ watch__app_8h_source.html | 107 +++++----- watch__buzzer_8h_source.html | 297 ++++++++++++++-------------- watch__deepsleep_8h_source.html | 135 +++++++------ watch__extint_8h_source.html | 125 ++++++------ watch__gpio_8h_source.html | 117 ++++++----- watch__i2c_8h_source.html | 123 ++++++------ watch__led_8h_source.html | 125 ++++++------ watch__private_8h_source.html | 117 ++++++----- watch__private__display_8h_source.html | 319 +++++++++++++++--------------- watch__rtc_8h_source.html | 193 +++++++++--------- watch__slcd_8h_source.html | 161 ++++++++------- watch__spi_8h_source.html | 109 +++++----- watch__uart_8h_source.html | 119 ++++++----- watch__utility_8h_source.html | 119 ++++++----- 110 files changed, 2576 insertions(+), 2483 deletions(-) diff --git a/annotated.html b/annotated.html index db844a91..51e87306 100644 --- a/annotated.html +++ b/annotated.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: Data Structures @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ + @@ -63,8 +63,7 @@ $(function() {
-
-
Data Structures
+
Data Structures
Here are the data structures with brief descriptions:
@@ -75,7 +74,7 @@ $(function() {
diff --git a/classes.html b/classes.html index 211762b3..0bc6f8bb 100644 --- a/classes.html +++ b/classes.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: Data Structure Index @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
@@ -63,20 +63,19 @@ $(function() {
-
-
Data Structure Index
+
Data Structure Index
diff --git a/dir_280ec1f3fe74f12cdd5c78898ed1ca3c.html b/dir_280ec1f3fe74f12cdd5c78898ed1ca3c.html index 6ad30f26..eb9a3e17 100644 --- a/dir_280ec1f3fe74f12cdd5c78898ed1ca3c.html +++ b/dir_280ec1f3fe74f12cdd5c78898ed1ca3c.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: watch-library/shared/watch Directory Reference @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
-
-
watch Directory Reference
+
watch Directory Reference
- - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+

Files

file  watch.h [code]
file  watch.h [code]
 
file  watch_adc.h [code]
 
file  watch_app.h [code]
 
file  watch_buzzer.h [code]
 
file  watch_deepsleep.h [code]
 
file  watch_extint.h [code]
 
file  watch_gpio.h [code]
 
file  watch_i2c.h [code]
 
file  watch_led.h [code]
 
file  watch_private.h [code]
 
file  watch_private_display.h [code]
 
file  watch_rtc.h [code]
 
file  watch_slcd.h [code]
 
file  watch_spi.h [code]
 
file  watch_uart.h [code]
 
file  watch_utility.h [code]
 
diff --git a/dir_3351a3556ab4b770be21f3a77a6d7b80.html b/dir_3351a3556ab4b770be21f3a77a6d7b80.html index f16c69f6..a6d56a85 100644 --- a/dir_3351a3556ab4b770be21f3a77a6d7b80.html +++ b/dir_3351a3556ab4b770be21f3a77a6d7b80.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: watch-library/shared Directory Reference @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
-
-
shared Directory Reference
+
shared Directory Reference
- + +

+

Directories

directory  watch
 
diff --git a/dir_f1a087a6659d970f5756e21fc1ac4961.html b/dir_f1a087a6659d970f5756e21fc1ac4961.html index 203750dc..91df1c4d 100644 --- a/dir_f1a087a6659d970f5756e21fc1ac4961.html +++ b/dir_f1a087a6659d970f5756e21fc1ac4961.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: watch-library Directory Reference @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
-
-
watch-library Directory Reference
+
watch-library Directory Reference
diff --git a/doxygen.css b/doxygen.css index ffbff022..90367372 100644 --- a/doxygen.css +++ b/doxygen.css @@ -1,4 +1,4 @@ -/* The standard CSS for doxygen 1.9.1 */ +/* The standard CSS for doxygen 1.9.3 */ body, table, div, p, dl { font: 400 14px/22px Roboto,sans-serif; @@ -228,6 +228,33 @@ a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { color: #4665A2; } +a.code.hl_class { /* style for links to class names in code snippets */ } +a.code.hl_struct { /* style for links to struct names in code snippets */ } +a.code.hl_union { /* style for links to union names in code snippets */ } +a.code.hl_interface { /* style for links to interface names in code snippets */ } +a.code.hl_protocol { /* style for links to protocol names in code snippets */ } +a.code.hl_category { /* style for links to category names in code snippets */ } +a.code.hl_exception { /* style for links to exception names in code snippets */ } +a.code.hl_service { /* style for links to service names in code snippets */ } +a.code.hl_singleton { /* style for links to singleton names in code snippets */ } +a.code.hl_concept { /* style for links to concept names in code snippets */ } +a.code.hl_namespace { /* style for links to namespace names in code snippets */ } +a.code.hl_package { /* style for links to package names in code snippets */ } +a.code.hl_define { /* style for links to macro names in code snippets */ } +a.code.hl_function { /* style for links to function names in code snippets */ } +a.code.hl_variable { /* style for links to variable names in code snippets */ } +a.code.hl_typedef { /* style for links to typedef names in code snippets */ } +a.code.hl_enumvalue { /* style for links to enum value names in code snippets */ } +a.code.hl_enumeration { /* style for links to enumeration names in code snippets */ } +a.code.hl_signal { /* style for links to Qt signal names in code snippets */ } +a.code.hl_slot { /* style for links to Qt slot names in code snippets */ } +a.code.hl_friend { /* style for links to friend names in code snippets */ } +a.code.hl_dcop { /* style for links to KDE3 DCOP names in code snippets */ } +a.code.hl_property { /* style for links to property names in code snippets */ } +a.code.hl_event { /* style for links to event names in code snippets */ } +a.code.hl_sequence { /* style for links to sequence names in code snippets */ } +a.code.hl_dictionary { /* style for links to dictionary names in code snippets */ } + /* @end */ dl.el { @@ -235,7 +262,7 @@ dl.el { } ul { - overflow: hidden; /*Fixed: list item bullets overlap floating elements*/ + overflow: visible; } #side-nav ul { @@ -313,6 +340,7 @@ div.line.glow { span.lineno { padding-right: 4px; + margin-right: 9px; text-align: right; border-right: 2px solid #0F0; background-color: #E8E8E8; @@ -439,6 +467,12 @@ img.footer { vertical-align: middle; } +.compoundTemplParams { + color: #4665A2; + font-size: 80%; + line-height: 120%; +} + /* @group Code Colorization */ span.keyword { @@ -1322,6 +1356,11 @@ dl.section dd { } +#projectrow +{ + height: 56px; +} + #projectlogo { text-align: center; @@ -1337,18 +1376,19 @@ dl.section dd { #projectalign { vertical-align: middle; + padding-left: 0.5em; } #projectname { - font: 300% Tahoma, Arial,sans-serif; + font: 200% Tahoma, Arial,sans-serif; margin: 0px; padding: 2px 0px; } #projectbrief { - font: 120% Tahoma, Arial,sans-serif; + font: 90% Tahoma, Arial,sans-serif; margin: 0px; padding: 0px; } @@ -1487,6 +1527,10 @@ span.emoji { */ } +span.obfuscator { + display: none; +} + .PageDocRTL-title div.toc li.level1 { margin-left: 0 !important; margin-right: 0; @@ -1541,7 +1585,7 @@ tr.heading h2 { #powerTip { cursor: default; - white-space: nowrap; + /*white-space: nowrap;*/ background-color: white; border: 1px solid gray; border-radius: 4px 4px 4px 4px; @@ -1780,6 +1824,10 @@ table.DocNodeLTR { margin-left: 0; } +code.JavaDocCode + direction:ltr; +} + tt, code, kbd, samp { display: inline-block; diff --git a/files.html b/files.html index bc96ecd0..b6d16079 100644 --- a/files.html +++ b/files.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: File List @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ + @@ -63,8 +63,7 @@ $(function() {
-
-
File List
+
File List
Here is a list of all documented files with brief descriptions:
@@ -93,7 +92,7 @@ $(function() {
diff --git a/globals.html b/globals.html index 41992148..5effd15b 100644 --- a/globals.html +++ b/globals.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: Globals @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
@@ -64,17 +64,13 @@ $(function() {
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:
diff --git a/globals_func.html b/globals_func.html index 0e65ee51..81a9be6d 100644 --- a/globals_func.html +++ b/globals_func.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: Globals @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ + @@ -64,17 +64,13 @@ $(function() {
 
diff --git a/group__adc.html b/group__adc.html index 7c24bf66..453b046c 100644 --- a/group__adc.html +++ b/group__adc.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: Analog Input @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ + @@ -66,27 +66,26 @@ $(function() {
Enumerations | Functions
-
-
Analog Input
+
Analog Input

This section covers functions related to the SAM L22's analog-to-digital converter, as well as configuring and reading values from the five analog-capable pins on the 9-pin connector. More...

- -

+

Enumerations

enum  watch_adc_reference_voltage { ADC_REFERENCE_INTREF = 0 +
enum  watch_adc_reference_voltage { ADC_REFERENCE_INTREF = 0 , ADC_REFERENCE_VCC_DIV1POINT6 , ADC_REFERENCE_VCC_DIV2 , ADC_REFERENCE_VCC }
 
- - + @@ -115,9 +114,9 @@ void 

+

Functions

-void watch_enable_adc (void)
+void watch_enable_adc (void)
 Enables the ADC peripheral. You must call this before attempting to read a value from an analog pin.
 
void watch_enable_analog_input (const uint8_t pin)
 

Detailed Description

-

This section covers functions related to the SAM L22's analog-to-digital converter, as well as configuring and reading values from the five analog-capable pins on the 9-pin connector.

+

This section covers functions related to the SAM L22's analog-to-digital converter, as well as configuring and reading values from the five analog-capable pins on the 9-pin connector.

Function Documentation

- +

◆ watch_disable_adc()

@@ -138,7 +137,7 @@ void  +

◆ watch_disable_analog_input()

@@ -164,7 +163,7 @@ void  +

◆ watch_enable_analog_input()

@@ -190,7 +189,7 @@ void  +

◆ watch_get_analog_pin_level()

- +

◆ watch_set_analog_num_samples()

@@ -272,7 +271,7 @@ void  +

◆ watch_set_analog_reference_voltage()

@@ -296,12 +295,12 @@ void  +

◆ watch_set_analog_sampling_length()

@@ -332,7 +331,7 @@ void  diff --git a/group__app.html b/group__app.html index a2cea10c..9f34b744 100644 --- a/group__app.html +++ b/group__app.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: Application Framework @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
@@ -65,22 +65,21 @@ $(function() {
-
-
Application Framework
+
Application Framework

This section covers the functions that you will implement in your app.c file when designing a Sensor Watch app. More...

- - + - + @@ -92,14 +91,14 @@ void  - +

+

Functions

-void app_init (void)
+void app_init (void)
 A function you will implement to initialize your application state. The app_init function is called before anything else. Use it to set up any internal data structures or application state required by your app, but don't configure any peripherals just yet.
 
-void app_wake_from_backup (void)
+void app_wake_from_backup (void)
 A function you will implement to wake from BACKUP mode, which wipes the system's RAM, and with it, your application's state. You may have chosen to store some important application state in the RTC's backup registers prior to entering this mode. You may restore that state here.
 
void app_setup (void)
void app_prepare_for_standby (void)
 A function you will implement to prepare to enter STANDBY mode. The app_prepare_for_standby function is called after your app_loop function returns true, and just before the watch enters STANDBY mode. In this mode most peripherals are shut down, and no code will run until the watch receives an interrupt (generally either the 1Hz tick or a press on one of the buttons). More...
 
-void app_wake_from_standby (void)
+void app_wake_from_standby (void)
 A method you will implement to configure the app after waking from STANDBY mode.
 

Detailed Description

-

This section covers the functions that you will implement in your app.c file when designing a Sensor Watch app.

-

You should be able to write a watch app by simply implementing these functions and declaring callbacks for various GPIO and peripheral interrupts. The main.c file takes care of calling these functions for you. The general flow:

+

This section covers the functions that you will implement in your app.c file when designing a Sensor Watch app.

+

You should be able to write a watch app by simply implementing these functions and declaring callbacks for various GPIO and peripheral interrupts. The main.c file takes care of calling these functions for you. The general flow:

  1. Your app_init() function is called.
- +

◆ watch_enable_digital_input()

@@ -181,7 +180,7 @@ Functions
- +

◆ watch_enable_digital_output()

@@ -207,7 +206,7 @@ Functions
- +

◆ watch_enable_pull_down()

@@ -233,7 +232,7 @@ Functions
- +

◆ watch_enable_pull_up()

@@ -259,7 +258,7 @@ Functions
- +

◆ watch_get_pin_level()

@@ -286,7 +285,7 @@ Functions
- +

◆ watch_set_pin_level()

@@ -326,7 +325,7 @@ Functions
diff --git a/group__i2c.html b/group__i2c.html index af989f8d..5b7e0beb 100644 --- a/group__i2c.html +++ b/group__i2c.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: I2C Controller Driver @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
@@ -65,22 +65,21 @@ $(function() {
-
-
I2C Controller Driver
+
I2C Controller Driver

This section covers functions related to the SAM L22's built-I2C driver, including configuring the I2C bus, putting values directly on the bus and reading data from registers on I2C devices. More...

- - + - + @@ -106,9 +105,9 @@ void 

+

Functions

-void watch_enable_i2c (void)
+void watch_enable_i2c (void)
 Enables the I2C peripheral. Call this before attempting to interface with I2C devices.
 
-void watch_disable_i2c (void)
+void watch_disable_i2c (void)
 Disables the I2C peripheral.
 
void watch_i2c_send (int16_t addr, uint8_t *buf, uint16_t length)
 

Detailed Description

-

This section covers functions related to the SAM L22's built-I2C driver, including configuring the I2C bus, putting values directly on the bus and reading data from registers on I2C devices.

+

This section covers functions related to the SAM L22's built-I2C driver, including configuring the I2C bus, putting values directly on the bus and reading data from registers on I2C devices.

Function Documentation

- +

◆ watch_i2c_read16()

@@ -147,7 +146,7 @@ void  +

◆ watch_i2c_read24()

@@ -186,7 +185,7 @@ void  +

◆ watch_i2c_read32()

@@ -225,7 +224,7 @@ void  +

◆ watch_i2c_read8()

@@ -263,7 +262,7 @@ void  +

◆ watch_i2c_receive()

@@ -307,7 +306,7 @@ void  +

◆ watch_i2c_send()

@@ -351,7 +350,7 @@ void  +

◆ watch_i2c_write8()

@@ -398,7 +397,7 @@ void  diff --git a/group__led.html b/group__led.html index f21e92c1..99419fbb 100644 --- a/group__led.html +++ b/group__led.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: LED Control @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
@@ -65,15 +65,14 @@ $(function() {
-
-
LED Control
+
LED Control

This section covers functions related to the bi-color red/green LED mounted behind the LCD. More...

- @@ -93,22 +92,22 @@ Functions - + - -

+

Functions

void watch_enable_leds (void)
 Enables the bi-color LED. More...
void watch_set_led_yellow (void)
 Sets both red and green LEDs to full brightness. More...
 
-void watch_set_led_off (void)
+void watch_set_led_off (void)
 Turns both the red and the green LEDs off.
 
+
 __attribute__ ((deprecated("Use watch_enable_leds instead"))) void watch_enable_led(bool unused)
 
+
 __attribute__ ((deprecated("Use watch_disable_leds instead"))) void watch_disable_led(bool unused)
 

Detailed Description

-

This section covers functions related to the bi-color red/green LED mounted behind the LCD.

-

The SAM L22 is an exceedingly power efficient chip, whereas the LED's are relatively power- hungry. The green LED, at full power, consumes more power than the whole chip in active mode, and the red LED consumes about twelve times as much power! The LED's should thus be used only sparingly in order to preserve battery life.

Note
Some watches use a red/blue LED instead of a red/green LED. You will be able to determine this easily when you double tap the reset button: if the pulsing bootloader LED is red, you have a red/green edition; if it is blue, you have a red/blue edition. For red/blue watches, build your project with the command make LED=BLUE, and the watch library will automatically swap the pins so that watch_set_led_red sets the red LED, and watch_set_led_green sets the blue one.
+

This section covers functions related to the bi-color red/green LED mounted behind the LCD.

+

The SAM L22 is an exceedingly power efficient chip, whereas the LED's are relatively power- hungry. The green LED, at full power, consumes more power than the whole chip in active mode, and the red LED consumes about twelve times as much power! The LED's should thus be used only sparingly in order to preserve battery life.

Note
Some watches use a red/blue LED instead of a red/green LED. You will be able to determine this easily when you double tap the reset button: if the pulsing bootloader LED is red, you have a red/green edition; if it is blue, you have a red/blue edition. For red/blue watches, build your project with the command make LED=BLUE, and the watch library will automatically swap the pins so that watch_set_led_red sets the red LED, and watch_set_led_green sets the blue one.

Function Documentation

- +

◆ watch_disable_leds()

@@ -129,7 +128,7 @@ void  +

◆ watch_enable_leds()

- +

◆ watch_set_led_yellow()

diff --git a/group__rtc.html b/group__rtc.html index 334411c2..84d39c58 100644 --- a/group__rtc.html +++ b/group__rtc.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: Real-Time Clock @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
@@ -69,44 +69,43 @@ $(function() { Typedefs | Enumerations | Functions
-
-
Real-Time Clock
+
Real-Time Clock

This section covers functions related to the SAM L22's real-time clock peripheral, including date, time and alarm functions. More...

-

+

Data Structures

union  watch_date_time
 
- -

+

Macros

+
#define WATCH_RTC_REFERENCE_YEAR   (2020)
 
- -

+

Typedefs

+
typedef enum watch_rtc_alarm_match watch_rtc_alarm_match
 
- -

+

Enumerations

enum  watch_rtc_alarm_match { ALARM_MATCH_DISABLED = 0 +
enum  watch_rtc_alarm_match { ALARM_MATCH_DISABLED = 0 , ALARM_MATCH_SS , ALARM_MATCH_MMSS , ALARM_MATCH_HHMMSS }
 
- - + @@ -118,15 +117,15 @@ bool  - + - + @@ -138,8 +137,8 @@ void  - + @@ -153,10 +152,10 @@ void 

+

Functions

-bool _watch_rtc_is_enabled (void)
+bool _watch_rtc_is_enabled (void)
 Called by main.c to check if the RTC is enabled. You may call this function, but outside of app_init, it should always return true.
 
void watch_rtc_set_date_time (watch_date_time date_time)
void watch_rtc_register_alarm_callback (ext_irq_cb_t callback, watch_date_time alarm_time, watch_rtc_alarm_match mask)
 Registers an alarm callback that will be called when the RTC time matches the target time, as masked by the provided mask. More...
 
-void watch_rtc_disable_alarm_callback (void)
+void watch_rtc_disable_alarm_callback (void)
 Disables the alarm callback.
 
void watch_rtc_register_tick_callback (ext_irq_cb_t callback)
 Registers a "tick" callback that will be called once per second. More...
 
-void watch_rtc_disable_tick_callback (void)
+void watch_rtc_disable_tick_callback (void)
 Disables the tick callback for the given period.
 
void watch_rtc_register_periodic_callback (ext_irq_cb_t callback, uint8_t frequency)
void watch_rtc_disable_matching_periodic_callbacks (uint8_t mask)
 Disables tick callbacks for the given periods (as a bitmask). More...
 
-void watch_rtc_disable_all_periodic_callbacks (void)
+void watch_rtc_disable_all_periodic_callbacks (void)
 Disables all periodic callbacks, including the once-per-second tick callback.
 
 __attribute__ ((deprecated("Use watch_rtc_set_date_time function instead"))) void watch_set_date_time(struct calendar_date_time date_time)
 

Detailed Description

-

This section covers functions related to the SAM L22's real-time clock peripheral, including date, time and alarm functions.

-

The real-time clock is the only peripheral that main.c enables for you. It is the cornerstone of low power operation on the watch, and it is required for several key functions that we assume will be available, namely the wake from BACKUP mode and the callback on the ALARM button. It is also required for the operation of the 1 Hz tick interrupt, which you will most likely use to wake from STANDBY mode.

+

This section covers functions related to the SAM L22's real-time clock peripheral, including date, time and alarm functions.

+

The real-time clock is the only peripheral that main.c enables for you. It is the cornerstone of low power operation on the watch, and it is required for several key functions that we assume will be available, namely the wake from BACKUP mode and the callback on the ALARM button. It is also required for the operation of the 1 Hz tick interrupt, which you will most likely use to wake from STANDBY mode.

Function Documentation

- +

◆ __attribute__() [1/3]

@@ -182,7 +181,7 @@ void  +

◆ __attribute__() [2/3]

@@ -208,7 +207,7 @@ void  +

◆ __attribute__() [3/3]

@@ -234,7 +233,7 @@ void  +

◆ watch_rtc_disable_matching_periodic_callbacks()

@@ -260,7 +259,7 @@ void  +

◆ watch_rtc_disable_periodic_callback()

@@ -286,7 +285,7 @@ void  +

◆ watch_rtc_get_date_time()

@@ -308,7 +307,7 @@ void  +

◆ watch_rtc_register_alarm_callback()

@@ -357,7 +356,7 @@ void  +

◆ watch_rtc_register_periodic_callback()

@@ -397,7 +396,7 @@ void  +

◆ watch_rtc_register_tick_callback()

@@ -424,7 +423,7 @@ void  +

◆ watch_rtc_set_date_time()

@@ -454,7 +453,7 @@ void  diff --git a/group__slcd.html b/group__slcd.html index d76e56d9..b881e358 100644 --- a/group__slcd.html +++ b/group__slcd.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: Segment LCD Display @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
@@ -67,22 +67,21 @@ $(function() { Typedefs | Enumerations | Functions
-
-
Segment LCD Display
+
Segment LCD Display

This section covers functions related to the Segment LCD display driver, which is responsible for displaying strings of characters and indicators on the main watch display. More...

- - +

+

Typedefs

-typedef enum WatchIndicatorSegment WatchIndicatorSegment
+typedef enum WatchIndicatorSegment WatchIndicatorSegment
 An enum listing the icons and indicators available on the watch.
 
-

+

Enumerations

enum  WatchIndicatorSegment {
  WATCH_INDICATOR_SIGNAL = 0 @@ -96,10 +95,10 @@ Enumerations
 An enum listing the icons and indicators available on the watch. More...
 
- - + @@ -108,19 +107,19 @@ void  - + - + - + @@ -149,10 +148,10 @@ void 

+

Functions

-void watch_enable_display (void)
+void watch_enable_display (void)
 Enables the Segment LCD display. Call this before attempting to set pixels or display strings.
 
void watch_set_pixel (uint8_t com, uint8_t seg)
void watch_clear_pixel (uint8_t com, uint8_t seg)
 Clears a pixel. Use this to manually clear a pixel with a given common and segment number. See segmap.html. More...
 
-void watch_clear_display (void)
+void watch_clear_display (void)
 Clears all segments of the display, including incicators and the colon.
 
void watch_display_string (char *string, uint8_t position)
 Displays a string at the given position, starting from the top left. There are ten digits. A space in any position will clear that digit. More...
 
-void watch_set_colon (void)
+void watch_set_colon (void)
 Turns the colon segment on.
 
-void watch_clear_colon (void)
+void watch_clear_colon (void)
 Turns the colon segment off.
 
void watch_set_indicator (WatchIndicatorSegment indicator)
 

Detailed Description

-

This section covers functions related to the Segment LCD display driver, which is responsible for displaying strings of characters and indicators on the main watch display.

-

The segment LCD controller consumes about 3 microamperes of power with no segments on, and about 4 microamperes with all segments on. There is also a slight power impact associated with updating the screen (about 1 microampere to update at 1 Hz). For the absolute lowest power operation, update the display only when its contents have changed, and disable the SLCD peripheral when the screen is not in use. For a map of all common and segment pins, see segmap.html. You can hover over any segment in that diagram to view the common and segment pins associated with each segment of the display.

+

This section covers functions related to the Segment LCD display driver, which is responsible for displaying strings of characters and indicators on the main watch display.

+

The segment LCD controller consumes about 3 microamperes of power with no segments on, and about 4 microamperes with all segments on. There is also a slight power impact associated with updating the screen (about 1 microampere to update at 1 Hz). For the absolute lowest power operation, update the display only when its contents have changed, and disable the SLCD peripheral when the screen is not in use. For a map of all common and segment pins, see segmap.html. You can hover over any segment in that diagram to view the common and segment pins associated with each segment of the display.

Enumeration Type Documentation

- +

◆ WatchIndicatorSegment

@@ -166,22 +165,22 @@ void  -EnumeratorWATCH_INDICATOR_SIGNAL 

The hourly signal indicator; also useful for indicating that sensors are on.

+EnumeratorWATCH_INDICATOR_SIGNAL 

The hourly signal indicator; also useful for indicating that sensors are on.

-WATCH_INDICATOR_BELL 

The small bell indicating that an alarm is set.

+WATCH_INDICATOR_BELL 

The small bell indicating that an alarm is set.

-WATCH_INDICATOR_PM 

The PM indicator, indicating that a time is in the afternoon.

+WATCH_INDICATOR_PM 

The PM indicator, indicating that a time is in the afternoon.

-WATCH_INDICATOR_24H 

The 24H indicator, indicating that the watch is in a 24-hour mode.

+WATCH_INDICATOR_24H 

The 24H indicator, indicating that the watch is in a 24-hour mode.

-WATCH_INDICATOR_LAP 

The LAP indicator; the F-91W uses this in its stopwatch UI.

+WATCH_INDICATOR_LAP 

The LAP indicator; the F-91W uses this in its stopwatch UI.

Function Documentation

- +

◆ watch_clear_all_indicators()

@@ -202,7 +201,7 @@ void  +

◆ watch_clear_indicator()

@@ -229,7 +228,7 @@ void  +

◆ watch_clear_pixel()

@@ -266,7 +265,7 @@ void  +

◆ watch_display_string()

@@ -304,7 +303,7 @@ void  +

◆ watch_set_indicator()

@@ -331,7 +330,7 @@ void  +

◆ watch_set_pixel()

@@ -368,7 +367,7 @@ void  +

◆ watch_start_character_blink()

@@ -395,7 +394,7 @@ void 

Blinks a single character in position 7. Does not affect other positions.

-

Six of the seven segments in position 7 (and only position 7) are capable of autonomous blinking. This blinking does not require any CPU resources, and will continue even in STANDBY and Sleep mode (but not Deep Sleep mode, since that mode turns off the LCD).

Parameters
+

Six of the seven segments in position 7 (and only position 7) are capable of autonomous blinking. This blinking does not require any CPU resources, and will continue even in STANDBY and Sleep mode (but not Deep Sleep mode, since that mode turns off the LCD).

Parameters
@@ -411,7 +410,7 @@ void  - +

◆ __attribute__() [2/2]

@@ -137,7 +136,7 @@ Functions

Outputs a single character on the debug UART.

-

Outputs a string on the debug UART.

+

Outputs a string on the debug UART.

Parameters
characterThe character you wish to blink.
durationThe duration of the on/off cycle in milliseconds, from 50 to ~4250 ms.
+

◆ watch_start_tick_animation()

@@ -428,7 +427,7 @@ void 

Begins a two-segment "tick-tock" animation in position 8.

-

Six of the seven segments in position 8 (and only position 8) are capable of autonomous animation. This animation is very basic, and consists of moving a bit pattern forward or backward in a shift register whose positions map to fixed segments on the LCD. Given this constraint, an animation across all six segments does not make sense; so the watch library offers only a simple "tick/tock" in segments D and E. This animation does not require any CPU resources, and will continue even in STANDBY and Sleep mode (but not Deep Sleep mode, since that mode turns off the LCD).

Parameters
+

Six of the seven segments in position 8 (and only position 8) are capable of autonomous animation. This animation is very basic, and consists of moving a bit pattern forward or backward in a shift register whose positions map to fixed segments on the LCD. Given this constraint, an animation across all six segments does not make sense; so the watch library offers only a simple "tick/tock" in segments D and E. This animation does not require any CPU resources, and will continue even in STANDBY and Sleep mode (but not Deep Sleep mode, since that mode turns off the LCD).

Parameters
durationThe duration of each frame in ms. 500 milliseconds produces a classic tick/tock.
@@ -437,7 +436,7 @@ void 
+

◆ watch_stop_blink()

@@ -454,11 +453,11 @@ void 

Stops and clears all blinking segments.

-

This will stop all blinking in position 7, and clear all segments in that digit.

+

This will stop all blinking in position 7, and clear all segments in that digit.

-
+

◆ watch_stop_tick_animation()

@@ -475,11 +474,11 @@ void 

Stops the tick/tock animation and clears all animating segments.

-

This will stop the animation and clear all segments in position 8.

+

This will stop the animation and clear all segments in position 8.

-
+

◆ watch_tick_animation_is_running()

@@ -503,7 +502,7 @@ void 
diff --git a/group__spi.html b/group__spi.html index 487837ea..50ee7a56 100644 --- a/group__spi.html +++ b/group__spi.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: SPI Controller Driver @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ + @@ -65,22 +65,21 @@ $(function() {
-
-
SPI Controller Driver
+
SPI Controller Driver

This section covers functions related to the SAM L22's built-in SPI driver, including configuring the SPI bus and writing to / reading from devices. More...

- - + - + @@ -94,9 +93,9 @@ void 

+

Functions

-void watch_enable_spi (void)
+void watch_enable_spi (void)
 Enables the SPI peripheral. Call this before attempting to interface with SPI devices.
 
-void watch_disable_spi (void)
+void watch_disable_spi (void)
 Disables the SPI peripheral.
 
bool watch_spi_write (const uint8_t *buf, uint16_t length)
 

Detailed Description

-

This section covers functions related to the SAM L22's built-in SPI driver, including configuring the SPI bus and writing to / reading from devices.

+

This section covers functions related to the SAM L22's built-in SPI driver, including configuring the SPI bus and writing to / reading from devices.

Function Documentation

- +

◆ watch_spi_read()

@@ -134,7 +133,7 @@ void 
+

◆ watch_spi_transfer()

@@ -179,7 +178,7 @@ void 
+

◆ watch_spi_write()

@@ -220,7 +219,7 @@ void 
diff --git a/group__uart.html b/group__uart.html index d0c23375..9ce99592 100644 --- a/group__uart.html +++ b/group__uart.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: UART @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ + @@ -65,15 +65,14 @@ $(function() {
-
-
UART
+
UART

This section covers functions related to the UART peripheral. More...

- @@ -92,9 +91,9 @@ Functions

+

Functions

void watch_enable_uart (const uint8_t tx_pin, const uint8_t rx_pin, uint32_t baud)
 Initializes the debug UART. More...
 

Detailed Description

-

This section covers functions related to the UART peripheral.

+

This section covers functions related to the UART peripheral.

Function Documentation

- +

◆ __attribute__() [1/2]

@@ -120,7 +119,7 @@ Functions
@@ -148,7 +147,7 @@ Functions - +

◆ watch_enable_uart()

@@ -192,7 +191,7 @@ Functions
- +

◆ watch_uart_getc()

@@ -214,7 +213,7 @@ Functions
- +

◆ watch_uart_puts()

@@ -243,7 +242,7 @@ Functions
diff --git a/group__utility.html b/group__utility.html index ac950def..d182dd24 100644 --- a/group__utility.html +++ b/group__utility.html @@ -2,8 +2,8 @@ - - + +Sensor Watch: Utility Functions @@ -19,10 +19,9 @@
cThe character you wish to output.
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
@@ -65,19 +65,18 @@ $(function() {
-
-
Utility Functions
+
Utility Functions

This section covers various useful functions that don't fit anywhere else. More...

- - - - + + + @@ -98,9 +97,9 @@ Functions

+

Functions

const char * watch_utility_get_weekday (watch_date_time date_time)
 Returns a two-letter weekday for the given timestamp, suitable for display in positions 0-1 of the watch face. More...
 
const char * watch_utility_get_weekday (watch_date_time date_time)
 Returns a two-letter weekday for the given timestamp, suitable for display in positions 0-1 of the watch face. More...
 
uint32_t watch_utility_convert_to_unix_time (uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t utc_offset)
 Returns the UNIX time (seconds since 1970) for a given date/time in UTC. More...
 
 

Detailed Description

-

This section covers various useful functions that don't fit anywhere else.

+

This section covers various useful functions that don't fit anywhere else.

Function Documentation

- +

◆ watch_utility_convert_to_12_hour()

@@ -128,7 +127,7 @@ Functions
- +

◆ watch_utility_convert_to_unix_time()

@@ -203,7 +202,7 @@ Functions
- +

◆ watch_utility_date_time_convert_zone()

@@ -249,7 +248,7 @@ Functions
- +

◆ watch_utility_date_time_from_unix_time()

@@ -288,7 +287,7 @@ Functions
- +

◆ watch_utility_date_time_to_unix_time()

@@ -326,14 +325,14 @@ Functions
- -

◆ watch_utility_get_weekday()

+ +

◆ watch_utility_get_weekday()

- + @@ -352,7 +351,7 @@ Functions - +

◆ watch_utility_thermistor_temperature()

@@ -421,7 +420,7 @@ Functions
diff --git a/index.html b/index.html index 3dabdefd..13fcce45 100644 --- a/index.html +++ b/index.html @@ -2,8 +2,8 @@ - - + +Sensor Watch: Sensor Watch Documentation @@ -19,10 +19,9 @@
const char* watch_utility_get_weekday const char * watch_utility_get_weekday ( watch_date_time  date_time)
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
@@ -62,12 +62,11 @@ $(function() {
-
-
-
Sensor Watch Documentation
+
+
Sensor Watch Documentation
-

This documentation covers most of the functions you will use to interact with the Sensor Watch hardware. It is divided into the following sections:

    +

    This documentation covers most of the functions you will use to interact with the Sensor Watch hardware. It is divided into the following sections:

    • Application Framework - This section covers the functions that you will implement in your app.c file when designing a Sensor Watch app.
    • Real-Time Clock - This section covers functions related to the SAM L22's real-time clock peripheral, including date, time and alarm functions.
    • Segment LCD Display - This section covers functions related to the Segment LCD display driver, which is responsible for displaying strings of characters and indicators on the main watch display.
    • @@ -85,7 +84,7 @@ $(function() {
    diff --git a/jquery.js b/jquery.js index 103c32d7..c9ed3d99 100644 --- a/jquery.js +++ b/jquery.js @@ -1,5 +1,5 @@ -/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;nx",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="
    ",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
    ",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0
    '); + searchBox='
    '+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + '
    '+ + '
    '; } else { - $('#main-menu').append('
  • '); + searchBox='
    '+ + ''+ + ''+ + ''+ + ''+ + ''+ + '' + '' + '
    '; + } + } + + $('#main-nav').before('
    '+ + ''+ + ''+ + '
    '); + $('#main-nav').append(makeTree(menudata,relPath)); + $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); + if (searchBox) { + $('#main-menu').append('
  • '); + } + var $mainMenuState = $('#main-menu-state'); + var prevWidth = 0; + if ($mainMenuState.length) { + function initResizableIfExists() { + if (typeof initResizable==='function') initResizable(); + } + // animate mobile menu + $mainMenuState.change(function(e) { + var $menu = $('#main-menu'); + var options = { duration: 250, step: initResizableIfExists }; + if (this.checked) { + options['complete'] = function() { $menu.css('display', 'block') }; + $menu.hide().slideDown(options); + } else { + options['complete'] = function() { $menu.css('display', 'none') }; + $menu.show().slideUp(options); + } + }); + // set default menu visibility + function resetState() { + var $menu = $('#main-menu'); + var $mainMenuState = $('#main-menu-state'); + var newWidth = $(window).outerWidth(); + if (newWidth!=prevWidth) { + if ($(window).outerWidth()<768) { + $mainMenuState.prop('checked',false); $menu.hide(); + $('#searchBoxPos1').html(searchBox); + $('#searchBoxPos2').hide(); + } else { + $menu.show(); + $('#searchBoxPos1').empty(); + $('#searchBoxPos2').html(searchBox); + $('#searchBoxPos2').show(); + } + prevWidth = newWidth; + } } + $(window).ready(function() { resetState(); initResizableIfExists(); }); + $(window).resize(resetState); } $('#main-menu').smartmenus(); } diff --git a/modules.html b/modules.html index ccbc7a9c..8ec6b20b 100644 --- a/modules.html +++ b/modules.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: Modules @@ -19,10 +19,9 @@
    - - + @@ -31,21 +30,22 @@
    -
    Sensor Watch -  0.0.0 +
    +
    Sensor Watch 0.0.0
    A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
    - + +/* @license-end */ +
@@ -63,8 +63,7 @@ $(function() {
-
-
Modules
+
Modules
Here is a list of all modules:
@@ -87,7 +86,7 @@ $(function() {
diff --git a/search/all_0.html b/search/all_0.html index 1ec5b2d5..c36c9af5 100644 --- a/search/all_0.html +++ b/search/all_0.html @@ -2,7 +2,7 @@ - + @@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
@@ -12,14 +12,14 @@
Loading...
Searching...
No Matches
+/* @license-end */ +
-
-
watch_date_time Union Reference
+
watch_date_time Union Reference
- - @@ -94,7 +93,7 @@ struct { -

+

Data Fields

+
struct {
   uint32_t   second: 6
 
unit
 
+
uint32_t reg
 
@@ -104,7 +103,7 @@ uint32_t reg
diff --git a/watch_8h.html b/watch_8h.html index b3432638..d3d8988d 100644 --- a/watch_8h.html +++ b/watch_8h.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: watch-library/shared/watch/watch.h File Reference @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
-
-
watch.h File Reference
+
watch.h File Reference
#include <stdint.h>
@@ -92,7 +91,7 @@ $(function() {

Go to the source code of this file.

- @@ -102,7 +101,7 @@ Functions

+

Functions

bool watch_is_battery_low (void)
 Returns true when the battery voltage dips below 2.5V. More...
 

Function Documentation

- +

◆ watch_is_battery_low()

@@ -119,11 +118,11 @@ Functions

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.

+

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()

@@ -140,14 +139,14 @@ Functions

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.

+

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.

diff --git a/watch_8h_source.html b/watch_8h_source.html index 1c31fe1c..2e75936a 100644 --- a/watch_8h_source.html +++ b/watch_8h_source.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: watch-library/shared/watch/watch.h Source File @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
-
-
watch.h
+
watch.h
-Go to the documentation of this file.
1 /*
-
2  * MIT License
-
3  *
-
4  * Copyright (c) 2020 Joey Castillo
-
5  *
-
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
-
7  * of this software and associated documentation files (the "Software"), to deal
-
8  * in the Software without restriction, including without limitation the rights
-
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-
10  * copies of the Software, and to permit persons to whom the Software is
-
11  * furnished to do so, subject to the following conditions:
-
12  *
-
13  * The above copyright notice and this permission notice shall be included in all
-
14  * copies or substantial portions of the Software.
-
15  *
-
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-
22  * SOFTWARE.
-
23  */
-
25 
-
26 #ifndef WATCH_H_
-
27 #define WATCH_H_
-
28 #include <stdint.h>
-
29 #include <stdbool.h>
-
30 #include "driver_init.h"
-
31 
-
55 #include "watch_app.h"
-
56 #include "watch_rtc.h"
-
57 #include "watch_slcd.h"
-
58 #include "watch_extint.h"
-
59 #include "watch_led.h"
-
60 #include "watch_buzzer.h"
-
61 #include "watch_adc.h"
-
62 #include "watch_gpio.h"
-
63 #include "watch_i2c.h"
-
64 #include "watch_spi.h"
-
65 #include "watch_uart.h"
-
66 #include "watch_deepsleep.h"
-
67 
-
68 #include "watch_private.h"
-
69 
- -
77 
- -
84 
-
85 #endif /* WATCH_H_ */
+Go to the documentation of this file.
1/*
+
2 * MIT License
+
3 *
+
4 * Copyright (c) 2020 Joey Castillo
+
5 *
+
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
+
7 * of this software and associated documentation files (the "Software"), to deal
+
8 * in the Software without restriction, including without limitation the rights
+
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+
10 * copies of the Software, and to permit persons to whom the Software is
+
11 * furnished to do so, subject to the following conditions:
+
12 *
+
13 * The above copyright notice and this permission notice shall be included in all
+
14 * copies or substantial portions of the Software.
+
15 *
+
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+
22 * SOFTWARE.
+
23 */
+
25
+
26#ifndef WATCH_H_
+
27#define WATCH_H_
+
28#include <stdint.h>
+
29#include <stdbool.h>
+
30#include "driver_init.h"
+
31
+
55#include "watch_app.h"
+
56#include "watch_rtc.h"
+
57#include "watch_slcd.h"
+
58#include "watch_extint.h"
+
59#include "watch_led.h"
+
60#include "watch_buzzer.h"
+
61#include "watch_adc.h"
+
62#include "watch_gpio.h"
+
63#include "watch_i2c.h"
+
64#include "watch_spi.h"
+
65#include "watch_uart.h"
+
66#include "watch_deepsleep.h"
+
67
+
68#include "watch_private.h"
+
69
+ +
77
+ +
84
+
85#endif /* WATCH_H_ */
bool watch_is_battery_low(void)
Returns true when the battery voltage dips below 2.5V.
bool watch_is_buzzer_or_led_enabled(void)
Returns true if either the buzzer or the LED driver is enabled.
diff --git a/watch__adc_8h_source.html b/watch__adc_8h_source.html index 1e7727c6..8365786c 100644 --- a/watch__adc_8h_source.html +++ b/watch__adc_8h_source.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: watch-library/shared/watch/watch_adc.h Source File @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
-
-
watch_adc.h
+
watch_adc.h
-
1 /*
-
2  * MIT License
-
3  *
-
4  * Copyright (c) 2020 Joey Castillo
-
5  *
-
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
-
7  * of this software and associated documentation files (the "Software"), to deal
-
8  * in the Software without restriction, including without limitation the rights
-
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-
10  * copies of the Software, and to permit persons to whom the Software is
-
11  * furnished to do so, subject to the following conditions:
-
12  *
-
13  * The above copyright notice and this permission notice shall be included in all
-
14  * copies or substantial portions of the Software.
-
15  *
-
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-
22  * SOFTWARE.
-
23  */
-
24 #ifndef _WATCH_ADC_H_INCLUDED
-
25 #define _WATCH_ADC_H_INCLUDED
-
27 
-
28 #include "watch.h"
-
29 
-
36 
-
39 void watch_enable_adc(void);
-
40 
-
44 void watch_enable_analog_input(const uint8_t pin);
-
45 
-
52 uint16_t watch_get_analog_pin_level(const uint8_t pin);
-
53 
-
75 void watch_set_analog_num_samples(uint16_t samples);
-
76 
-
95 void watch_set_analog_sampling_length(uint8_t cycles);
-
96 
-
97 typedef enum {
-
98  ADC_REFERENCE_INTREF = 0,
-
99  ADC_REFERENCE_VCC_DIV1POINT6,
-
100  ADC_REFERENCE_VCC_DIV2,
-
101  ADC_REFERENCE_VCC,
-
102 } watch_adc_reference_voltage;
-
103 
-
104 
-
130 void watch_set_analog_reference_voltage(watch_adc_reference_voltage reference);
-
131 
-
142 uint16_t watch_get_vcc_voltage(void);
-
143 
-
147 void watch_disable_analog_input(const uint8_t pin);
-
148 
-
154 void watch_disable_adc(void);
-
155 
-
157 #endif
+
1/*
+
2 * MIT License
+
3 *
+
4 * Copyright (c) 2020 Joey Castillo
+
5 *
+
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
+
7 * of this software and associated documentation files (the "Software"), to deal
+
8 * in the Software without restriction, including without limitation the rights
+
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+
10 * copies of the Software, and to permit persons to whom the Software is
+
11 * furnished to do so, subject to the following conditions:
+
12 *
+
13 * The above copyright notice and this permission notice shall be included in all
+
14 * copies or substantial portions of the Software.
+
15 *
+
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+
22 * SOFTWARE.
+
23 */
+
24#ifndef _WATCH_ADC_H_INCLUDED
+
25#define _WATCH_ADC_H_INCLUDED
+
27
+
28#include "watch.h"
+
29
+
36
+ +
40
+
44void watch_enable_analog_input(const uint8_t pin);
+
45
+
52uint16_t watch_get_analog_pin_level(const uint8_t pin);
+
53
+
75void watch_set_analog_num_samples(uint16_t samples);
+
76
+ +
96
+
97typedef enum {
+
98 ADC_REFERENCE_INTREF = 0,
+
99 ADC_REFERENCE_VCC_DIV1POINT6,
+
100 ADC_REFERENCE_VCC_DIV2,
+
101 ADC_REFERENCE_VCC,
+
102} watch_adc_reference_voltage;
+
103
+
104
+
130void watch_set_analog_reference_voltage(watch_adc_reference_voltage reference);
+
131
+ +
143
+
147void watch_disable_analog_input(const uint8_t pin);
+
148
+ +
155
+
157#endif
uint16_t watch_get_analog_pin_level(const uint8_t pin)
Reads an analog value from one of the pins.
void watch_enable_analog_input(const uint8_t pin)
Configures the selected pin for analog input.
uint16_t watch_get_vcc_voltage(void)
Returns the voltage of the VCC supply in millivolts (i.e. 3000 mV == 3.0 V). If running on a coin cel...
@@ -140,7 +139,7 @@ $(function() {
diff --git a/watch__app_8h_source.html b/watch__app_8h_source.html index 1d6be073..e27fe15c 100644 --- a/watch__app_8h_source.html +++ b/watch__app_8h_source.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: watch-library/shared/watch/watch_app.h Source File @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
-
-
watch_app.h
+
watch_app.h
-
1 /*
-
2  * MIT License
-
3  *
-
4  * Copyright (c) 2020 Joey Castillo
-
5  *
-
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
-
7  * of this software and associated documentation files (the "Software"), to deal
-
8  * in the Software without restriction, including without limitation the rights
-
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-
10  * copies of the Software, and to permit persons to whom the Software is
-
11  * furnished to do so, subject to the following conditions:
-
12  *
-
13  * The above copyright notice and this permission notice shall be included in all
-
14  * copies or substantial portions of the Software.
-
15  *
-
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-
22  * SOFTWARE.
-
23  */
-
24 #ifndef _WATCH_APP_H_INCLUDED
-
25 #define _WATCH_APP_H_INCLUDED
-
27 
-
54 
-
58 void app_init(void);
-
59 
- -
65 
-
74 void app_setup(void);
-
75 
-
89 bool app_loop(void);
-
90 
- -
102 
- -
106 
-
108 #endif
+
1/*
+
2 * MIT License
+
3 *
+
4 * Copyright (c) 2020 Joey Castillo
+
5 *
+
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
+
7 * of this software and associated documentation files (the "Software"), to deal
+
8 * in the Software without restriction, including without limitation the rights
+
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+
10 * copies of the Software, and to permit persons to whom the Software is
+
11 * furnished to do so, subject to the following conditions:
+
12 *
+
13 * The above copyright notice and this permission notice shall be included in all
+
14 * copies or substantial portions of the Software.
+
15 *
+
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+
22 * SOFTWARE.
+
23 */
+
24#ifndef _WATCH_APP_H_INCLUDED
+
25#define _WATCH_APP_H_INCLUDED
+
27
+
54
+
58void app_init(void);
+
59
+ +
65
+
74void app_setup(void);
+
75
+
89bool app_loop(void);
+
90
+ +
102
+ +
106
+
108#endif
void app_wake_from_backup(void)
A function you will implement to wake from BACKUP mode, which wipes the system's RAM,...
void app_wake_from_standby(void)
A method you will implement to configure the app after waking from STANDBY mode.
void app_setup(void)
A function you will implement to set up your application. The app_setup function is like setup() in A...
@@ -120,7 +119,7 @@ $(function() {
diff --git a/watch__buzzer_8h_source.html b/watch__buzzer_8h_source.html index e25bccef..1f7eee34 100644 --- a/watch__buzzer_8h_source.html +++ b/watch__buzzer_8h_source.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: watch-library/shared/watch/watch_buzzer.h Source File @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
-
-
watch_buzzer.h
+
watch_buzzer.h
-
1 /*
-
2  * MIT License
-
3  *
-
4  * Copyright (c) 2020 Joey Castillo
-
5  *
-
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
-
7  * of this software and associated documentation files (the "Software"), to deal
-
8  * in the Software without restriction, including without limitation the rights
-
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-
10  * copies of the Software, and to permit persons to whom the Software is
-
11  * furnished to do so, subject to the following conditions:
-
12  *
-
13  * The above copyright notice and this permission notice shall be included in all
-
14  * copies or substantial portions of the Software.
-
15  *
-
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-
22  * SOFTWARE.
-
23  */
-
24 #ifndef _WATCH_BUZZER_H_INCLUDED
-
25 #define _WATCH_BUZZER_H_INCLUDED
-
27 
-
28 #include "watch.h"
-
29 
-
34 
- -
37 
-
42 void watch_set_buzzer_period(uint32_t period);
-
43 
- -
49 
- -
55 
- -
59 
-
61 typedef enum BuzzerNote {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
151 
-
158 void watch_buzzer_play_note(BuzzerNote note, uint16_t duration_ms);
-
159 
-
161 extern const uint16_t NotePeriods[108];
-
162 
-
164 #endif
+
1/*
+
2 * MIT License
+
3 *
+
4 * Copyright (c) 2020 Joey Castillo
+
5 *
+
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
+
7 * of this software and associated documentation files (the "Software"), to deal
+
8 * in the Software without restriction, including without limitation the rights
+
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+
10 * copies of the Software, and to permit persons to whom the Software is
+
11 * furnished to do so, subject to the following conditions:
+
12 *
+
13 * The above copyright notice and this permission notice shall be included in all
+
14 * copies or substantial portions of the Software.
+
15 *
+
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+
22 * SOFTWARE.
+
23 */
+
24#ifndef _WATCH_BUZZER_H_INCLUDED
+
25#define _WATCH_BUZZER_H_INCLUDED
+
27
+
28#include "watch.h"
+
29
+
34
+ +
37
+
42void watch_set_buzzer_period(uint32_t period);
+
43
+ +
49
+ +
55
+ +
59
+
61typedef enum BuzzerNote {
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
151
+
158void watch_buzzer_play_note(BuzzerNote note, uint16_t duration_ms);
+
159
+
161extern const uint16_t NotePeriods[108];
+
162
+
164#endif
void watch_buzzer_play_note(BuzzerNote note, uint16_t duration_ms)
Plays the given note for a set duration.
BuzzerNote
87 notes for use with watch_buzzer_play_note
Definition: watch_buzzer.h:61
void watch_disable_buzzer(void)
Disables the TCC peripheral that drives the buzzer.
@@ -306,7 +305,7 @@ $(function() {
diff --git a/watch__deepsleep_8h_source.html b/watch__deepsleep_8h_source.html index 221c491f..e2b50fc2 100644 --- a/watch__deepsleep_8h_source.html +++ b/watch__deepsleep_8h_source.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: watch-library/shared/watch/watch_deepsleep.h Source File @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
-
-
watch_deepsleep.h
+
watch_deepsleep.h
-
1 /*
-
2  * MIT License
-
3  *
-
4  * Copyright (c) 2020 Joey Castillo
-
5  *
-
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
-
7  * of this software and associated documentation files (the "Software"), to deal
-
8  * in the Software without restriction, including without limitation the rights
-
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-
10  * copies of the Software, and to permit persons to whom the Software is
-
11  * furnished to do so, subject to the following conditions:
-
12  *
-
13  * The above copyright notice and this permission notice shall be included in all
-
14  * copies or substantial portions of the Software.
-
15  *
-
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-
22  * SOFTWARE.
-
23  */
-
24 #ifndef _WATCH_DEEPSLEEP_H_INCLUDED
-
25 #define _WATCH_DEEPSLEEP_H_INCLUDED
-
27 
-
28 #include "watch.h"
-
29 
-
30 // These are declared in watch_rtc.c.
-
31 extern ext_irq_cb_t btn_alarm_callback;
-
32 extern ext_irq_cb_t a2_callback;
-
33 extern ext_irq_cb_t a4_callback;
-
34 
-
68 
-
87 void watch_register_extwake_callback(uint8_t pin, ext_irq_cb_t callback, bool level);
-
88 
- -
95 
-
100 void watch_store_backup_data(uint32_t data, uint8_t reg);
-
101 
-
106 uint32_t watch_get_backup_data(uint8_t reg);
-
107 
- -
123 
- -
135 
- -
152 
-
153 __attribute__((deprecated("Use watch_enter_sleep_mode or watch_enter_deep_sleep_mode instead")))
-
154 void watch_enter_shallow_sleep(bool display_on);
-
155 
-
156 __attribute__((deprecated("Use watch_enter_backup_mode instead")))
-
157 void watch_enter_deep_sleep(void);
-
159 #endif
+
1/*
+
2 * MIT License
+
3 *
+
4 * Copyright (c) 2020 Joey Castillo
+
5 *
+
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
+
7 * of this software and associated documentation files (the "Software"), to deal
+
8 * in the Software without restriction, including without limitation the rights
+
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+
10 * copies of the Software, and to permit persons to whom the Software is
+
11 * furnished to do so, subject to the following conditions:
+
12 *
+
13 * The above copyright notice and this permission notice shall be included in all
+
14 * copies or substantial portions of the Software.
+
15 *
+
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+
22 * SOFTWARE.
+
23 */
+
24#ifndef _WATCH_DEEPSLEEP_H_INCLUDED
+
25#define _WATCH_DEEPSLEEP_H_INCLUDED
+
27
+
28#include "watch.h"
+
29
+
30// These are declared in watch_rtc.c.
+
31extern ext_irq_cb_t btn_alarm_callback;
+
32extern ext_irq_cb_t a2_callback;
+
33extern ext_irq_cb_t a4_callback;
+
34
+
68
+
87void watch_register_extwake_callback(uint8_t pin, ext_irq_cb_t callback, bool level);
+
88
+ +
95
+
100void watch_store_backup_data(uint32_t data, uint8_t reg);
+
101
+
106uint32_t watch_get_backup_data(uint8_t reg);
+
107
+ +
123
+ +
135
+ +
152
+
153__attribute__((deprecated("Use watch_enter_sleep_mode or watch_enter_deep_sleep_mode instead")))
+
154void watch_enter_shallow_sleep(bool display_on);
+
155
+
156__attribute__((deprecated("Use watch_enter_backup_mode instead")))
+
157void watch_enter_deep_sleep(void);
+
159#endif
uint32_t watch_get_backup_data(uint8_t reg)
Gets 32 bits of data from the RTC's BACKUP register.
void watch_store_backup_data(uint32_t data, uint8_t reg)
Stores data in one of the RTC's backup registers, which retain their data in BACKUP mode.
void watch_enter_backup_mode(void)
Enters the SAM L22's lowest-power mode, BACKUP.
@@ -136,7 +135,7 @@ $(function() {
diff --git a/watch__extint_8h_source.html b/watch__extint_8h_source.html index 28e55db4..68353b31 100644 --- a/watch__extint_8h_source.html +++ b/watch__extint_8h_source.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: watch-library/shared/watch/watch_extint.h Source File @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
-
-
watch_extint.h
+
watch_extint.h
-
1 /*
-
2  * MIT License
-
3  *
-
4  * Copyright (c) 2020 Joey Castillo
-
5  *
-
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
-
7  * of this software and associated documentation files (the "Software"), to deal
-
8  * in the Software without restriction, including without limitation the rights
-
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-
10  * copies of the Software, and to permit persons to whom the Software is
-
11  * furnished to do so, subject to the following conditions:
-
12  *
-
13  * The above copyright notice and this permission notice shall be included in all
-
14  * copies or substantial portions of the Software.
-
15  *
-
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-
22  * SOFTWARE.
-
23  */
-
24 #ifndef _WATCH_EXTINT_H_INCLUDED
-
25 #define _WATCH_EXTINT_H_INCLUDED
-
27 
-
28 #include "watch.h"
-
29 #include "hal_ext_irq.h"
-
30 
-
42 
- -
45  INTERRUPT_TRIGGER_NONE = 0,
-
46  INTERRUPT_TRIGGER_RISING,
-
47  INTERRUPT_TRIGGER_FALLING,
-
48  INTERRUPT_TRIGGER_BOTH,
- -
50 
- -
53 
- -
56 
-
77 void watch_register_interrupt_callback(const uint8_t pin, ext_irq_cb_t callback, watch_interrupt_trigger trigger);
-
78 
-
79 __attribute__((deprecated("Use watch_register_interrupt_callback or watch_register_extwake_callback instead")))
-
80 void watch_register_button_callback(const uint8_t pin, ext_irq_cb_t callback);
-
81 
-
82 __attribute__((deprecated("Use watch_enable_external_interrupts instead")))
-
83 void watch_enable_buttons(void);
-
85 #endif
+
1/*
+
2 * MIT License
+
3 *
+
4 * Copyright (c) 2020 Joey Castillo
+
5 *
+
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
+
7 * of this software and associated documentation files (the "Software"), to deal
+
8 * in the Software without restriction, including without limitation the rights
+
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+
10 * copies of the Software, and to permit persons to whom the Software is
+
11 * furnished to do so, subject to the following conditions:
+
12 *
+
13 * The above copyright notice and this permission notice shall be included in all
+
14 * copies or substantial portions of the Software.
+
15 *
+
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+
22 * SOFTWARE.
+
23 */
+
24#ifndef _WATCH_EXTINT_H_INCLUDED
+
25#define _WATCH_EXTINT_H_INCLUDED
+
27
+
28#include "watch.h"
+
29#include "hal_ext_irq.h"
+
30
+
42
+ +
45 INTERRUPT_TRIGGER_NONE = 0,
+
46 INTERRUPT_TRIGGER_RISING,
+
47 INTERRUPT_TRIGGER_FALLING,
+
48 INTERRUPT_TRIGGER_BOTH,
+ +
50
+ +
53
+ +
56
+
77void watch_register_interrupt_callback(const uint8_t pin, ext_irq_cb_t callback, watch_interrupt_trigger trigger);
+
78
+
79__attribute__((deprecated("Use watch_register_interrupt_callback or watch_register_extwake_callback instead")))
+
80void watch_register_button_callback(const uint8_t pin, ext_irq_cb_t callback);
+
81
+
82__attribute__((deprecated("Use watch_enable_external_interrupts instead")))
+
83void watch_enable_buttons(void);
+
85#endif
watch_interrupt_trigger
An enum defining the types of interrupt trigger you wish to scan for.
Definition: watch_extint.h:44
void watch_disable_external_interrupts(void)
Disables the external interrupt controller.
void watch_enable_external_interrupts(void)
Enables the external interrupt controller.
@@ -128,7 +127,7 @@ $(function() {
diff --git a/watch__gpio_8h_source.html b/watch__gpio_8h_source.html index 02d6d9be..7eee4740 100644 --- a/watch__gpio_8h_source.html +++ b/watch__gpio_8h_source.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: watch-library/shared/watch/watch_gpio.h Source File @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
-
-
watch_gpio.h
+
watch_gpio.h
-
1 /*
-
2  * MIT License
-
3  *
-
4  * Copyright (c) 2020 Joey Castillo
-
5  *
-
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
-
7  * of this software and associated documentation files (the "Software"), to deal
-
8  * in the Software without restriction, including without limitation the rights
-
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-
10  * copies of the Software, and to permit persons to whom the Software is
-
11  * furnished to do so, subject to the following conditions:
-
12  *
-
13  * The above copyright notice and this permission notice shall be included in all
-
14  * copies or substantial portions of the Software.
-
15  *
-
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-
22  * SOFTWARE.
-
23  */
-
24 #ifndef _WATCH_GPIO_H_INCLUDED
-
25 #define _WATCH_GPIO_H_INCLUDED
-
27 
-
28 #include "watch.h"
-
29 
-
34 
-
37 void watch_enable_digital_input(const uint8_t pin);
-
38 
-
42 void watch_disable_digital_input(const uint8_t pin);
-
43 
-
47 void watch_enable_pull_up(const uint8_t pin);
-
48 
-
52 void watch_enable_pull_down(const uint8_t pin);
-
53 
-
58 bool watch_get_pin_level(const uint8_t pin);
-
59 
-
63 void watch_enable_digital_output(const uint8_t pin);
-
64 
-
68 void watch_disable_digital_output(const uint8_t pin);
-
69 
-
74 void watch_set_pin_level(const uint8_t pin, const bool level);
-
76 #endif
+
1/*
+
2 * MIT License
+
3 *
+
4 * Copyright (c) 2020 Joey Castillo
+
5 *
+
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
+
7 * of this software and associated documentation files (the "Software"), to deal
+
8 * in the Software without restriction, including without limitation the rights
+
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+
10 * copies of the Software, and to permit persons to whom the Software is
+
11 * furnished to do so, subject to the following conditions:
+
12 *
+
13 * The above copyright notice and this permission notice shall be included in all
+
14 * copies or substantial portions of the Software.
+
15 *
+
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+
22 * SOFTWARE.
+
23 */
+
24#ifndef _WATCH_GPIO_H_INCLUDED
+
25#define _WATCH_GPIO_H_INCLUDED
+
27
+
28#include "watch.h"
+
29
+
34
+
37void watch_enable_digital_input(const uint8_t pin);
+
38
+
42void watch_disable_digital_input(const uint8_t pin);
+
43
+
47void watch_enable_pull_up(const uint8_t pin);
+
48
+
52void watch_enable_pull_down(const uint8_t pin);
+
53
+
58bool watch_get_pin_level(const uint8_t pin);
+
59
+
63void watch_enable_digital_output(const uint8_t pin);
+
64
+
68void watch_disable_digital_output(const uint8_t pin);
+
69
+
74void watch_set_pin_level(const uint8_t pin, const bool level);
+
76#endif
void watch_disable_digital_output(const uint8_t pin)
Disables digital output on the selected pin.
void watch_set_pin_level(const uint8_t pin, const bool level)
Sets the level of the selected pin.
void watch_enable_pull_up(const uint8_t pin)
Enables a pull-up resistor on the selected pin.
@@ -128,7 +127,7 @@ $(function() {
diff --git a/watch__i2c_8h_source.html b/watch__i2c_8h_source.html index 1f3b1e62..37099bcd 100644 --- a/watch__i2c_8h_source.html +++ b/watch__i2c_8h_source.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: watch-library/shared/watch/watch_i2c.h Source File @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
-
-
watch_i2c.h
+
watch_i2c.h
-
1 /*
-
2  * MIT License
-
3  *
-
4  * Copyright (c) 2020 Joey Castillo
-
5  *
-
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
-
7  * of this software and associated documentation files (the "Software"), to deal
-
8  * in the Software without restriction, including without limitation the rights
-
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-
10  * copies of the Software, and to permit persons to whom the Software is
-
11  * furnished to do so, subject to the following conditions:
-
12  *
-
13  * The above copyright notice and this permission notice shall be included in all
-
14  * copies or substantial portions of the Software.
-
15  *
-
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-
22  * SOFTWARE.
-
23  */
-
24 #ifndef _WATCH_I2C_H_INCLUDED
-
25 #define _WATCH_I2C_H_INCLUDED
-
27 
-
28 #include "watch.h"
-
29 
-
36 
-
38 void watch_enable_i2c(void);
-
39 
-
42 void watch_disable_i2c(void);
-
43 
-
49 void watch_i2c_send(int16_t addr, uint8_t *buf, uint16_t length);
-
50 
-
56 void watch_i2c_receive(int16_t addr, uint8_t *buf, uint16_t length);
-
57 
-
63 void watch_i2c_write8(int16_t addr, uint8_t reg, uint8_t data);
-
64 
-
70 uint8_t watch_i2c_read8(int16_t addr, uint8_t reg);
-
71 
-
81 uint16_t watch_i2c_read16(int16_t addr, uint8_t reg);
-
82 
-
92 uint32_t watch_i2c_read24(int16_t addr, uint8_t reg);
-
93 
-
94 
-
104 uint32_t watch_i2c_read32(int16_t addr, uint8_t reg);
-
106 #endif
+
1/*
+
2 * MIT License
+
3 *
+
4 * Copyright (c) 2020 Joey Castillo
+
5 *
+
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
+
7 * of this software and associated documentation files (the "Software"), to deal
+
8 * in the Software without restriction, including without limitation the rights
+
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+
10 * copies of the Software, and to permit persons to whom the Software is
+
11 * furnished to do so, subject to the following conditions:
+
12 *
+
13 * The above copyright notice and this permission notice shall be included in all
+
14 * copies or substantial portions of the Software.
+
15 *
+
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+
22 * SOFTWARE.
+
23 */
+
24#ifndef _WATCH_I2C_H_INCLUDED
+
25#define _WATCH_I2C_H_INCLUDED
+
27
+
28#include "watch.h"
+
29
+
36
+ +
39
+ +
43
+
49void watch_i2c_send(int16_t addr, uint8_t *buf, uint16_t length);
+
50
+
56void watch_i2c_receive(int16_t addr, uint8_t *buf, uint16_t length);
+
57
+
63void watch_i2c_write8(int16_t addr, uint8_t reg, uint8_t data);
+
64
+
70uint8_t watch_i2c_read8(int16_t addr, uint8_t reg);
+
71
+
81uint16_t watch_i2c_read16(int16_t addr, uint8_t reg);
+
82
+
92uint32_t watch_i2c_read24(int16_t addr, uint8_t reg);
+
93
+
94
+
104uint32_t watch_i2c_read32(int16_t addr, uint8_t reg);
+
106#endif
void watch_disable_i2c(void)
Disables the I2C peripheral.
uint32_t watch_i2c_read32(int16_t addr, uint8_t reg)
Reads an unsigned little-endian int from a register in an I2C device.
void watch_i2c_receive(int16_t addr, uint8_t *buf, uint16_t length)
Receives a series of values from a device on the I2C bus.
@@ -132,7 +131,7 @@ $(function() {
diff --git a/watch__led_8h_source.html b/watch__led_8h_source.html index 2031b110..386461eb 100644 --- a/watch__led_8h_source.html +++ b/watch__led_8h_source.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: watch-library/shared/watch/watch_led.h Source File @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
-
-
watch_led.h
+
watch_led.h
-
1 /*
-
2  * MIT License
-
3  *
-
4  * Copyright (c) 2020 Joey Castillo
-
5  *
-
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
-
7  * of this software and associated documentation files (the "Software"), to deal
-
8  * in the Software without restriction, including without limitation the rights
-
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-
10  * copies of the Software, and to permit persons to whom the Software is
-
11  * furnished to do so, subject to the following conditions:
-
12  *
-
13  * The above copyright notice and this permission notice shall be included in all
-
14  * copies or substantial portions of the Software.
-
15  *
-
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-
22  * SOFTWARE.
-
23  */
-
24 #ifndef _WATCH_LED_H_INCLUDED
-
25 #define _WATCH_LED_H_INCLUDED
-
27 
-
28 #include "watch.h"
-
29 
-
43 
-
49 void watch_enable_leds(void);
-
50 
-
55 void watch_disable_leds(void);
-
56 
-
64 void watch_set_led_color(uint8_t red, uint8_t green);
-
65 
-
69 void watch_set_led_red(void);
-
70 
- -
76 
- -
83 
-
85 void watch_set_led_off(void);
-
86 
-
87 __attribute__((deprecated("Use watch_enable_leds instead")))
-
88 void watch_enable_led(bool unused);
-
89 
-
90 __attribute__((deprecated("Use watch_disable_leds instead")))
-
91 void watch_disable_led(bool unused);
-
93 #endif
+
1/*
+
2 * MIT License
+
3 *
+
4 * Copyright (c) 2020 Joey Castillo
+
5 *
+
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
+
7 * of this software and associated documentation files (the "Software"), to deal
+
8 * in the Software without restriction, including without limitation the rights
+
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+
10 * copies of the Software, and to permit persons to whom the Software is
+
11 * furnished to do so, subject to the following conditions:
+
12 *
+
13 * The above copyright notice and this permission notice shall be included in all
+
14 * copies or substantial portions of the Software.
+
15 *
+
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+
22 * SOFTWARE.
+
23 */
+
24#ifndef _WATCH_LED_H_INCLUDED
+
25#define _WATCH_LED_H_INCLUDED
+
27
+
28#include "watch.h"
+
29
+
43
+ +
50
+ +
56
+
64void watch_set_led_color(uint8_t red, uint8_t green);
+
65
+ +
70
+ +
76
+ +
83
+ +
86
+
87__attribute__((deprecated("Use watch_enable_leds instead")))
+
88void watch_enable_led(bool unused);
+
89
+
90__attribute__((deprecated("Use watch_disable_leds instead")))
+
91void watch_disable_led(bool unused);
+
93#endif
void watch_set_led_color(uint8_t red, uint8_t green)
Sets the LED to a custom color by modulating each output's duty cycle.
void watch_set_led_red(void)
Sets the red LED to full brightness, and turns the green LED off.
void watch_set_led_yellow(void)
Sets both red and green LEDs to full brightness.
@@ -131,7 +130,7 @@ $(function() {
diff --git a/watch__private_8h_source.html b/watch__private_8h_source.html index 3a73312a..c6800940 100644 --- a/watch__private_8h_source.html +++ b/watch__private_8h_source.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: watch-library/shared/watch/watch_private.h Source File @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
-
-
watch_private.h
+
watch_private.h
-
1 /*
-
2  * MIT License
-
3  *
-
4  * Copyright (c) 2021 Joey Castillo
-
5  *
-
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
-
7  * of this software and associated documentation files (the "Software"), to deal
-
8  * in the Software without restriction, including without limitation the rights
-
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-
10  * copies of the Software, and to permit persons to whom the Software is
-
11  * furnished to do so, subject to the following conditions:
-
12  *
-
13  * The above copyright notice and this permission notice shall be included in all
-
14  * copies or substantial portions of the Software.
-
15  *
-
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-
22  * SOFTWARE.
-
23  */
-
24 #ifndef _WATCH_PRIVATE_H_INCLUDED
-
25 #define _WATCH_PRIVATE_H_INCLUDED
-
26 
-
27 #include "watch.h"
-
28 
-
30 void _watch_init(void);
-
31 
-
33 void _watch_rtc_init(void);
-
34 
-
36 void _watch_enable_tcc(void);
-
37 
-
39 void _watch_disable_tcc(void);
-
40 
-
42 void _watch_enable_usb(void);
-
43 
-
44 // this function ends up getting called by printf to log stuff to the USB console.
-
45 int _write(int file, char *ptr, int len);
-
46 
-
47 // this method could be overridden to read stuff from the USB console? but no need rn.
-
48 int _read(void);
-
49 
-
50 #endif
+
1/*
+
2 * MIT License
+
3 *
+
4 * Copyright (c) 2021 Joey Castillo
+
5 *
+
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
+
7 * of this software and associated documentation files (the "Software"), to deal
+
8 * in the Software without restriction, including without limitation the rights
+
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+
10 * copies of the Software, and to permit persons to whom the Software is
+
11 * furnished to do so, subject to the following conditions:
+
12 *
+
13 * The above copyright notice and this permission notice shall be included in all
+
14 * copies or substantial portions of the Software.
+
15 *
+
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+
22 * SOFTWARE.
+
23 */
+
24#ifndef _WATCH_PRIVATE_H_INCLUDED
+
25#define _WATCH_PRIVATE_H_INCLUDED
+
26
+
27#include "watch.h"
+
28
+
30void _watch_init(void);
+
31
+
33void _watch_rtc_init(void);
+
34
+
36void _watch_enable_tcc(void);
+
37
+
39void _watch_disable_tcc(void);
+
40
+
42void _watch_enable_usb(void);
+
43
+
44// this function ends up getting called by printf to log stuff to the USB console.
+
45int _write(int file, char *ptr, int len);
+
46
+
47// this method could be overridden to read stuff from the USB console? but no need rn.
+
48int _read(void);
+
49
+
50#endif
diff --git a/watch__private__display_8h_source.html b/watch__private__display_8h_source.html index c3eebfdd..b85b79f6 100644 --- a/watch__private__display_8h_source.html +++ b/watch__private__display_8h_source.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: watch-library/shared/watch/watch_private_display.h Source File @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
-
-
watch_private_display.h
+
watch_private_display.h
-
1 /*
-
2  * MIT License
-
3  *
-
4  * Copyright (c) 2020 Joey Castillo
-
5  *
-
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
-
7  * of this software and associated documentation files (the "Software"), to deal
-
8  * in the Software without restriction, including without limitation the rights
-
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-
10  * copies of the Software, and to permit persons to whom the Software is
-
11  * furnished to do so, subject to the following conditions:
-
12  *
-
13  * The above copyright notice and this permission notice shall be included in all
-
14  * copies or substantial portions of the Software.
-
15  *
-
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-
22  * SOFTWARE.
-
23  */
-
24 #ifndef _WATCH_PRIVATE_DISPLAY_H_INCLUDED
-
25 #define _WATCH_PRIVATE_DISPLAY_H_INCLUDED
-
26 
-
27 #include "hpl_slcd_config.h"
-
28 #include "driver_init.h"
-
29 
-
30 static const uint8_t Character_Set[] =
-
31 {
-
32  0b00000000, //
-
33  0b01100000, // ! (L in the top half for positions 4 and 6)
-
34  0b00100010, // "
-
35  0b01100011, // # (degree symbol, hash mark doesn't fit)
-
36  0b00000000, // $ (unused)
-
37  0b00000000, // % (unused)
-
38  0b01000100, // & ("lowercase 7" for positions 4 and 6)
-
39  0b00100000, // '
-
40  0b00111001, // (
-
41  0b00001111, // )
-
42  0b00000000, // * (unused)
-
43  0b11000000, // + (only works in position 0)
-
44  0b00000100, // ,
-
45  0b01000000, // -
-
46  0b01000000, // . (same as -, semantically most useful)
-
47  0b00010010, // /
-
48  0b00111111, // 0
-
49  0b00000110, // 1
-
50  0b01011011, // 2
-
51  0b01001111, // 3
-
52  0b01100110, // 4
-
53  0b01101101, // 5
-
54  0b01111101, // 6
-
55  0b00000111, // 7
-
56  0b01111111, // 8
-
57  0b01101111, // 9
-
58  0b00000000, // : (unused)
-
59  0b00000000, // ; (unused)
-
60  0b01011000, // <
-
61  0b01001000, // =
-
62  0b01001100, // >
-
63  0b01010011, // ?
-
64  0b11111111, // @ (all segments on)
-
65  0b01110111, // A
-
66  0b01111111, // B
-
67  0b00111001, // C
-
68  0b00111111, // D
-
69  0b01111001, // E
-
70  0b01110001, // F
-
71  0b00111101, // G
-
72  0b01110110, // H
-
73  0b10001001, // I (only works in position 0)
-
74  0b00001110, // J
-
75  0b01110101, // K
-
76  0b00111000, // L
-
77  0b10110111, // M (only works in position 0)
-
78  0b00110111, // N
-
79  0b00111111, // O
-
80  0b01110011, // P
-
81  0b01100111, // Q
-
82  0b11110111, // R (only works in position 1)
-
83  0b01101101, // S
-
84  0b10000001, // T (only works in position 0; set (1, 12) to make it work in position 1)
-
85  0b00111110, // U
-
86  0b00111110, // V
-
87  0b10111110, // W (only works in position 0)
-
88  0b01111110, // X
-
89  0b01101110, // Y
-
90  0b00011011, // Z
-
91  0b00111001, // [
-
92  0b00100100, // backslash
-
93  0b00001111, // ]
-
94  0b00100011, // ^
-
95  0b00001000, // _
-
96  0b00000010, // `
-
97  0b01011111, // a
-
98  0b01111100, // b
-
99  0b01011000, // c
-
100  0b01011110, // d
-
101  0b01111011, // e
-
102  0b01110001, // f
-
103  0b01101111, // g
-
104  0b01110100, // h
-
105  0b00010000, // i
-
106  0b01000010, // j (appears as superscript to work in more positions)
-
107  0b01110101, // k
-
108  0b00110000, // l
-
109  0b10110111, // m (only works in position 0)
-
110  0b01010100, // n
-
111  0b01011100, // o
-
112  0b01110011, // p
-
113  0b01100111, // q
-
114  0b01010000, // r
-
115  0b01101101, // s
-
116  0b01111000, // t
-
117  0b01100010, // u (appears in (u)pper half to work in more positions)
-
118  0b00011100, // v (looks like u but in the lower half)
-
119  0b10111110, // w (only works in position 0)
-
120  0b01111110, // x
-
121  0b01101110, // y
-
122  0b00011011, // z
-
123  0b00111001, // {
-
124  0b00110000, // |
-
125  0b00001111, // }
-
126  0b00000001, // ~
-
127 };
-
128 
-
129 static const uint64_t Segment_Map[] = {
-
130  0x4e4f0e8e8f8d4d0d, // Position 0, mode
-
131  0xc8c4c4c8b4b4b0b, // Position 1, mode (Segments B and C shared, as are segments E and F)
-
132  0xc049c00a49890949, // Position 2, day of month (Segments A, D, G shared; missing segment F)
-
133  0xc048088886874707, // Position 3, day of month
-
134  0xc053921252139352, // Position 4, clock hours (Segments A and D shared)
-
135  0xc054511415559594, // Position 5, clock hours
-
136  0xc057965616179716, // Position 6, clock minutes (Segments A and D shared)
-
137  0xc041804000018a81, // Position 7, clock minutes
-
138  0xc043420203048382, // Position 8, clock seconds
-
139  0xc045440506468584, // Position 9, clock seconds
-
140 };
-
141 
-
142 static const uint8_t Num_Chars = 10;
-
143 
-
144 void watch_display_character(uint8_t character, uint8_t position);
-
145 
-
146 #endif
+
1/*
+
2 * MIT License
+
3 *
+
4 * Copyright (c) 2020 Joey Castillo
+
5 *
+
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
+
7 * of this software and associated documentation files (the "Software"), to deal
+
8 * in the Software without restriction, including without limitation the rights
+
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+
10 * copies of the Software, and to permit persons to whom the Software is
+
11 * furnished to do so, subject to the following conditions:
+
12 *
+
13 * The above copyright notice and this permission notice shall be included in all
+
14 * copies or substantial portions of the Software.
+
15 *
+
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+
22 * SOFTWARE.
+
23 */
+
24#ifndef _WATCH_PRIVATE_DISPLAY_H_INCLUDED
+
25#define _WATCH_PRIVATE_DISPLAY_H_INCLUDED
+
26
+
27#include "hpl_slcd_config.h"
+
28#include "driver_init.h"
+
29
+
30static const uint8_t Character_Set[] =
+
31{
+
32 0b00000000, //
+
33 0b01100000, // ! (L in the top half for positions 4 and 6)
+
34 0b00100010, // "
+
35 0b01100011, // # (degree symbol, hash mark doesn't fit)
+
36 0b00000000, // $ (unused)
+
37 0b00000000, // % (unused)
+
38 0b01000100, // & ("lowercase 7" for positions 4 and 6)
+
39 0b00100000, // '
+
40 0b00111001, // (
+
41 0b00001111, // )
+
42 0b00000000, // * (unused)
+
43 0b11000000, // + (only works in position 0)
+
44 0b00000100, // ,
+
45 0b01000000, // -
+
46 0b01000000, // . (same as -, semantically most useful)
+
47 0b00010010, // /
+
48 0b00111111, // 0
+
49 0b00000110, // 1
+
50 0b01011011, // 2
+
51 0b01001111, // 3
+
52 0b01100110, // 4
+
53 0b01101101, // 5
+
54 0b01111101, // 6
+
55 0b00000111, // 7
+
56 0b01111111, // 8
+
57 0b01101111, // 9
+
58 0b00000000, // : (unused)
+
59 0b00000000, // ; (unused)
+
60 0b01011000, // <
+
61 0b01001000, // =
+
62 0b01001100, // >
+
63 0b01010011, // ?
+
64 0b11111111, // @ (all segments on)
+
65 0b01110111, // A
+
66 0b01111111, // B
+
67 0b00111001, // C
+
68 0b00111111, // D
+
69 0b01111001, // E
+
70 0b01110001, // F
+
71 0b00111101, // G
+
72 0b01110110, // H
+
73 0b10001001, // I (only works in position 0)
+
74 0b00001110, // J
+
75 0b01110101, // K
+
76 0b00111000, // L
+
77 0b10110111, // M (only works in position 0)
+
78 0b00110111, // N
+
79 0b00111111, // O
+
80 0b01110011, // P
+
81 0b01100111, // Q
+
82 0b11110111, // R (only works in position 1)
+
83 0b01101101, // S
+
84 0b10000001, // T (only works in position 0; set (1, 12) to make it work in position 1)
+
85 0b00111110, // U
+
86 0b00111110, // V
+
87 0b10111110, // W (only works in position 0)
+
88 0b01111110, // X
+
89 0b01101110, // Y
+
90 0b00011011, // Z
+
91 0b00111001, // [
+
92 0b00100100, // backslash
+
93 0b00001111, // ]
+
94 0b00100011, // ^
+
95 0b00001000, // _
+
96 0b00000010, // `
+
97 0b01011111, // a
+
98 0b01111100, // b
+
99 0b01011000, // c
+
100 0b01011110, // d
+
101 0b01111011, // e
+
102 0b01110001, // f
+
103 0b01101111, // g
+
104 0b01110100, // h
+
105 0b00010000, // i
+
106 0b01000010, // j (appears as superscript to work in more positions)
+
107 0b01110101, // k
+
108 0b00110000, // l
+
109 0b10110111, // m (only works in position 0)
+
110 0b01010100, // n
+
111 0b01011100, // o
+
112 0b01110011, // p
+
113 0b01100111, // q
+
114 0b01010000, // r
+
115 0b01101101, // s
+
116 0b01111000, // t
+
117 0b01100010, // u (appears in (u)pper half to work in more positions)
+
118 0b00011100, // v (looks like u but in the lower half)
+
119 0b10111110, // w (only works in position 0)
+
120 0b01111110, // x
+
121 0b01101110, // y
+
122 0b00011011, // z
+
123 0b00111001, // {
+
124 0b00110000, // |
+
125 0b00001111, // }
+
126 0b00000001, // ~
+
127};
+
128
+
129static const uint64_t Segment_Map[] = {
+
130 0x4e4f0e8e8f8d4d0d, // Position 0, mode
+
131 0xc8c4c4c8b4b4b0b, // Position 1, mode (Segments B and C shared, as are segments E and F)
+
132 0xc049c00a49890949, // Position 2, day of month (Segments A, D, G shared; missing segment F)
+
133 0xc048088886874707, // Position 3, day of month
+
134 0xc053921252139352, // Position 4, clock hours (Segments A and D shared)
+
135 0xc054511415559594, // Position 5, clock hours
+
136 0xc057965616179716, // Position 6, clock minutes (Segments A and D shared)
+
137 0xc041804000018a81, // Position 7, clock minutes
+
138 0xc043420203048382, // Position 8, clock seconds
+
139 0xc045440506468584, // Position 9, clock seconds
+
140};
+
141
+
142static const uint8_t Num_Chars = 10;
+
143
+
144void watch_display_character(uint8_t character, uint8_t position);
+
145
+
146#endif
diff --git a/watch__rtc_8h_source.html b/watch__rtc_8h_source.html index 1bc77f9b..8016cfe0 100644 --- a/watch__rtc_8h_source.html +++ b/watch__rtc_8h_source.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: watch-library/shared/watch/watch_rtc.h Source File @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
-
-
watch_rtc.h
+
watch_rtc.h
-
1 /*
-
2  * MIT License
-
3  *
-
4  * Copyright (c) 2020 Joey Castillo
-
5  *
-
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
-
7  * of this software and associated documentation files (the "Software"), to deal
-
8  * in the Software without restriction, including without limitation the rights
-
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-
10  * copies of the Software, and to permit persons to whom the Software is
-
11  * furnished to do so, subject to the following conditions:
-
12  *
-
13  * The above copyright notice and this permission notice shall be included in all
-
14  * copies or substantial portions of the Software.
-
15  *
-
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-
22  * SOFTWARE.
-
23  */
-
24 #ifndef _WATCH_RTC_H_INCLUDED
-
25 #define _WATCH_RTC_H_INCLUDED
-
27 
-
28 #include "watch.h"
-
29 #include "hpl_calendar.h"
-
30 
-
41 
-
42 #define WATCH_RTC_REFERENCE_YEAR (2020)
-
43 
-
44 typedef union {
-
45  struct {
-
46  uint32_t second : 6; // 0-59
-
47  uint32_t minute : 6; // 0-59
-
48  uint32_t hour : 5; // 0-23
-
49  uint32_t day : 5; // 1-31
-
50  uint32_t month : 4; // 1-12
-
51  uint32_t year : 6; // 0-63 (representing 2020-2083)
-
52  } unit;
-
53  uint32_t reg; // the bit-packed value as expected by the RTC peripheral's CLOCK register.
- -
55 
-
56 typedef enum watch_rtc_alarm_match {
-
57  ALARM_MATCH_DISABLED = 0,
-
58  ALARM_MATCH_SS,
-
59  ALARM_MATCH_MMSS,
-
60  ALARM_MATCH_HHMMSS,
-
61 } watch_rtc_alarm_match;
-
62 
- -
67 
- -
77 
- -
83 
-
99 void watch_rtc_register_alarm_callback(ext_irq_cb_t callback, watch_date_time alarm_time, watch_rtc_alarm_match mask);
-
100 
- -
104 
-
112 void watch_rtc_register_tick_callback(ext_irq_cb_t callback);
-
113 
- -
117 
-
133 void watch_rtc_register_periodic_callback(ext_irq_cb_t callback, uint8_t frequency);
-
134 
-
138 void watch_rtc_disable_periodic_callback(uint8_t frequency);
-
139 
- -
145 
- -
149 
-
153 __attribute__((deprecated("Use watch_rtc_set_date_time function instead")))
-
154 void watch_set_date_time(struct calendar_date_time date_time);
-
155 
-
159 __attribute__((deprecated("Use the watch_rtc_get_date_time function instead")))
-
160 void watch_get_date_time(struct calendar_date_time *date_time);
-
161 
-
166 __attribute__((deprecated("Use the watch_rtc_register_tick_callback function instead")))
-
167 void watch_register_tick_callback(ext_irq_cb_t callback);
-
168 
-
170 #endif
+
1/*
+
2 * MIT License
+
3 *
+
4 * Copyright (c) 2020 Joey Castillo
+
5 *
+
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
+
7 * of this software and associated documentation files (the "Software"), to deal
+
8 * in the Software without restriction, including without limitation the rights
+
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+
10 * copies of the Software, and to permit persons to whom the Software is
+
11 * furnished to do so, subject to the following conditions:
+
12 *
+
13 * The above copyright notice and this permission notice shall be included in all
+
14 * copies or substantial portions of the Software.
+
15 *
+
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+
22 * SOFTWARE.
+
23 */
+
24#ifndef _WATCH_RTC_H_INCLUDED
+
25#define _WATCH_RTC_H_INCLUDED
+
27
+
28#include "watch.h"
+
29#include "hpl_calendar.h"
+
30
+
41
+
42#define WATCH_RTC_REFERENCE_YEAR (2020)
+
43
+
44typedef union {
+
45 struct {
+
46 uint32_t second : 6; // 0-59
+
47 uint32_t minute : 6; // 0-59
+
48 uint32_t hour : 5; // 0-23
+
49 uint32_t day : 5; // 1-31
+
50 uint32_t month : 4; // 1-12
+
51 uint32_t year : 6; // 0-63 (representing 2020-2083)
+
52 } unit;
+
53 uint32_t reg; // the bit-packed value as expected by the RTC peripheral's CLOCK register.
+ +
55
+
56typedef enum watch_rtc_alarm_match {
+
57 ALARM_MATCH_DISABLED = 0,
+
58 ALARM_MATCH_SS,
+
59 ALARM_MATCH_MMSS,
+
60 ALARM_MATCH_HHMMSS,
+
61} watch_rtc_alarm_match;
+
62
+ +
67
+ +
77
+ +
83
+
99void watch_rtc_register_alarm_callback(ext_irq_cb_t callback, watch_date_time alarm_time, watch_rtc_alarm_match mask);
+
100
+ +
104
+
112void watch_rtc_register_tick_callback(ext_irq_cb_t callback);
+
113
+ +
117
+
133void watch_rtc_register_periodic_callback(ext_irq_cb_t callback, uint8_t frequency);
+
134
+ +
139
+ +
145
+ +
149
+
153__attribute__((deprecated("Use watch_rtc_set_date_time function instead")))
+
154void watch_set_date_time(struct calendar_date_time date_time);
+
155
+
159__attribute__((deprecated("Use the watch_rtc_get_date_time function instead")))
+
160void watch_get_date_time(struct calendar_date_time *date_time);
+
161
+
166__attribute__((deprecated("Use the watch_rtc_register_tick_callback function instead")))
+
167void watch_register_tick_callback(ext_irq_cb_t callback);
+
168
+
170#endif
void watch_rtc_disable_all_periodic_callbacks(void)
Disables all periodic callbacks, including the once-per-second tick callback.
watch_date_time watch_rtc_get_date_time(void)
Returns the date and time.
bool _watch_rtc_is_enabled(void)
Called by main.c to check if the RTC is enabled. You may call this function, but outside of app_init,...
@@ -171,7 +170,7 @@ $(function() {
diff --git a/watch__slcd_8h_source.html b/watch__slcd_8h_source.html index 6861b8c9..08960983 100644 --- a/watch__slcd_8h_source.html +++ b/watch__slcd_8h_source.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: watch-library/shared/watch/watch_slcd.h Source File @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
-
-
watch_slcd.h
+
watch_slcd.h
-
1 /*
-
2  * MIT License
-
3  *
-
4  * Copyright (c) 2020 Joey Castillo
-
5  *
-
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
-
7  * of this software and associated documentation files (the "Software"), to deal
-
8  * in the Software without restriction, including without limitation the rights
-
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-
10  * copies of the Software, and to permit persons to whom the Software is
-
11  * furnished to do so, subject to the following conditions:
-
12  *
-
13  * The above copyright notice and this permission notice shall be included in all
-
14  * copies or substantial portions of the Software.
-
15  *
-
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-
22  * SOFTWARE.
-
23  */
-
24 #ifndef _WATCH_SLCD_H_INCLUDED
-
25 #define _WATCH_SLCD_H_INCLUDED
-
27 
-
28 #include "watch.h"
-
29 
-
43 
-
45 typedef enum WatchIndicatorSegment {
- - - - - - -
52 
- -
57 
-
63 void watch_set_pixel(uint8_t com, uint8_t seg);
-
64 
-
70 void watch_clear_pixel(uint8_t com, uint8_t seg);
-
71 
- -
75 
-
85 void watch_display_string(char *string, uint8_t position);
-
86 
-
89 void watch_set_colon(void);
-
90 
-
93 void watch_clear_colon(void);
-
94 
- -
99 
- -
104 
-
108 void watch_clear_all_indicators(void);
-
109 
-
122 void watch_start_character_blink(char character, uint32_t duration);
-
123 
-
127 void watch_stop_blink(void);
-
128 
-
139 void watch_start_tick_animation(uint32_t duration);
-
140 
- -
145 
- -
151 #endif
+
1/*
+
2 * MIT License
+
3 *
+
4 * Copyright (c) 2020 Joey Castillo
+
5 *
+
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
+
7 * of this software and associated documentation files (the "Software"), to deal
+
8 * in the Software without restriction, including without limitation the rights
+
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+
10 * copies of the Software, and to permit persons to whom the Software is
+
11 * furnished to do so, subject to the following conditions:
+
12 *
+
13 * The above copyright notice and this permission notice shall be included in all
+
14 * copies or substantial portions of the Software.
+
15 *
+
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+
22 * SOFTWARE.
+
23 */
+
24#ifndef _WATCH_SLCD_H_INCLUDED
+
25#define _WATCH_SLCD_H_INCLUDED
+
27
+
28#include "watch.h"
+
29
+
43
+ + + + + + + +
52
+ +
57
+
63void watch_set_pixel(uint8_t com, uint8_t seg);
+
64
+
70void watch_clear_pixel(uint8_t com, uint8_t seg);
+
71
+ +
75
+
85void watch_display_string(char *string, uint8_t position);
+
86
+
89void watch_set_colon(void);
+
90
+
93void watch_clear_colon(void);
+
94
+ +
99
+ +
104
+ +
109
+
122void watch_start_character_blink(char character, uint32_t duration);
+
123
+ +
128
+
139void watch_start_tick_animation(uint32_t duration);
+
140
+ +
145
+ +
151#endif
void watch_set_colon(void)
Turns the colon segment on.
Definition: watch_private_display.c:109
void watch_enable_display(void)
Enables the Segment LCD display. Call this before attempting to set pixels or display strings.
void watch_display_string(char *string, uint8_t position)
Displays a string at the given position, starting from the top left. There are ten digits....
Definition: watch_private_display.c:95
@@ -163,7 +162,7 @@ $(function() {
diff --git a/watch__spi_8h_source.html b/watch__spi_8h_source.html index 8ec1bb28..8570046e 100644 --- a/watch__spi_8h_source.html +++ b/watch__spi_8h_source.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: watch-library/shared/watch/watch_spi.h Source File @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
-
-
watch_spi.h
+
watch_spi.h
-
1 /*
-
2  * MIT License
-
3  *
-
4  * Copyright (c) 2022 Joey Castillo
-
5  *
-
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
-
7  * of this software and associated documentation files (the "Software"), to deal
-
8  * in the Software without restriction, including without limitation the rights
-
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-
10  * copies of the Software, and to permit persons to whom the Software is
-
11  * furnished to do so, subject to the following conditions:
-
12  *
-
13  * The above copyright notice and this permission notice shall be included in all
-
14  * copies or substantial portions of the Software.
-
15  *
-
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-
22  * SOFTWARE.
-
23  */
-
24 
-
25 #ifndef _WATCH_SPI_H_INCLUDED
-
26 #define _WATCH_SPI_H_INCLUDED
-
28 
-
29 #include "watch.h"
-
30 
-
36 
-
38 void watch_enable_spi(void);
-
39 
-
42 void watch_disable_spi(void);
-
43 
-
49 bool watch_spi_write(const uint8_t *buf, uint16_t length);
-
50 
-
56 bool watch_spi_read(uint8_t *buf, uint16_t length);
-
57 
-
64 bool watch_spi_transfer(const uint8_t *data_out, uint8_t *data_in, uint16_t length);
-
65 
-
67 #endif
+
1/*
+
2 * MIT License
+
3 *
+
4 * Copyright (c) 2022 Joey Castillo
+
5 *
+
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
+
7 * of this software and associated documentation files (the "Software"), to deal
+
8 * in the Software without restriction, including without limitation the rights
+
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+
10 * copies of the Software, and to permit persons to whom the Software is
+
11 * furnished to do so, subject to the following conditions:
+
12 *
+
13 * The above copyright notice and this permission notice shall be included in all
+
14 * copies or substantial portions of the Software.
+
15 *
+
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+
22 * SOFTWARE.
+
23 */
+
24
+
25#ifndef _WATCH_SPI_H_INCLUDED
+
26#define _WATCH_SPI_H_INCLUDED
+
28
+
29#include "watch.h"
+
30
+
36
+ +
39
+ +
43
+
49bool watch_spi_write(const uint8_t *buf, uint16_t length);
+
50
+
56bool watch_spi_read(uint8_t *buf, uint16_t length);
+
57
+
64bool watch_spi_transfer(const uint8_t *data_out, uint8_t *data_in, uint16_t length);
+
65
+
67#endif
bool watch_spi_read(uint8_t *buf, uint16_t length)
Reads a series of values from a device on the SPI bus.
bool watch_spi_transfer(const uint8_t *data_out, uint8_t *data_in, uint16_t length)
Reads a series of values from a device on the SPI bus.
void watch_enable_spi(void)
Enables the SPI peripheral. Call this before attempting to interface with SPI devices.
@@ -121,7 +120,7 @@ $(function() {
diff --git a/watch__uart_8h_source.html b/watch__uart_8h_source.html index 237d3729..83c579ac 100644 --- a/watch__uart_8h_source.html +++ b/watch__uart_8h_source.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: watch-library/shared/watch/watch_uart.h Source File @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
-
-
watch_uart.h
+
watch_uart.h
-
1 /*
-
2  * MIT License
-
3  *
-
4  * Copyright (c) 2020 Joey Castillo
-
5  *
-
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
-
7  * of this software and associated documentation files (the "Software"), to deal
-
8  * in the Software without restriction, including without limitation the rights
-
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-
10  * copies of the Software, and to permit persons to whom the Software is
-
11  * furnished to do so, subject to the following conditions:
-
12  *
-
13  * The above copyright notice and this permission notice shall be included in all
-
14  * copies or substantial portions of the Software.
-
15  *
-
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-
22  * SOFTWARE.
-
23  */
-
24 #ifndef _WATCH_UART_H_INCLUDED
-
25 #define _WATCH_UART_H_INCLUDED
-
27 
-
28 #include "watch.h"
-
29 
-
34 
-
42 void watch_enable_uart(const uint8_t tx_pin, const uint8_t rx_pin, uint32_t baud);
-
43 
-
47 void watch_uart_puts(char *s);
-
48 
-
53 char watch_uart_getc(void);
-
54 
-
55 // Begin deprecated functions:
-
56 
-
60 __attribute__((deprecated("Use watch_enable_uart to enable the UART.")))
-
61 void watch_enable_debug_uart(uint32_t baud);
-
62 
-
66 __attribute__((deprecated("Use watch_uart_puts to print to the UART, or printf to log debug messages over USB.")))
-
67 void watch_debug_putc(char c);
-
68 
-
72 __attribute__((deprecated("Use watch_uart_puts to print to the UART, or printf to log debug messages over USB.")))
-
73 void watch_debug_puts(char *s);
-
75 #endif
+
1/*
+
2 * MIT License
+
3 *
+
4 * Copyright (c) 2020 Joey Castillo
+
5 *
+
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
+
7 * of this software and associated documentation files (the "Software"), to deal
+
8 * in the Software without restriction, including without limitation the rights
+
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+
10 * copies of the Software, and to permit persons to whom the Software is
+
11 * furnished to do so, subject to the following conditions:
+
12 *
+
13 * The above copyright notice and this permission notice shall be included in all
+
14 * copies or substantial portions of the Software.
+
15 *
+
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+
22 * SOFTWARE.
+
23 */
+
24#ifndef _WATCH_UART_H_INCLUDED
+
25#define _WATCH_UART_H_INCLUDED
+
27
+
28#include "watch.h"
+
29
+
34
+
42void watch_enable_uart(const uint8_t tx_pin, const uint8_t rx_pin, uint32_t baud);
+
43
+
47void watch_uart_puts(char *s);
+
48
+
53char watch_uart_getc(void);
+
54
+
55// Begin deprecated functions:
+
56
+
60__attribute__((deprecated("Use watch_enable_uart to enable the UART.")))
+
61void watch_enable_debug_uart(uint32_t baud);
+
62
+
66__attribute__((deprecated("Use watch_uart_puts to print to the UART, or printf to log debug messages over USB.")))
+
67void watch_debug_putc(char c);
+
68
+
72__attribute__((deprecated("Use watch_uart_puts to print to the UART, or printf to log debug messages over USB.")))
+
73void watch_debug_puts(char *s);
+
75#endif
char watch_uart_getc(void)
Receives a single byte from the UART's RX pin.
void watch_enable_uart(const uint8_t tx_pin, const uint8_t rx_pin, uint32_t baud)
Initializes the debug UART.
void watch_uart_puts(char *s)
Transmits a string of bytes on the UART's TX pin.
@@ -125,7 +124,7 @@ $(function() {
diff --git a/watch__utility_8h_source.html b/watch__utility_8h_source.html index 042ca4fe..31f20c51 100644 --- a/watch__utility_8h_source.html +++ b/watch__utility_8h_source.html @@ -2,8 +2,8 @@ - - + + Sensor Watch: watch-library/shared/watch/watch_utility.h Source File @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ +
-
-
watch_utility.h
+
watch_utility.h
-
1 /*
-
2  * MIT License
-
3  *
-
4  * Copyright (c) 2021 Joey Castillo
-
5  *
-
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
-
7  * of this software and associated documentation files (the "Software"), to deal
-
8  * in the Software without restriction, including without limitation the rights
-
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-
10  * copies of the Software, and to permit persons to whom the Software is
-
11  * furnished to do so, subject to the following conditions:
-
12  *
-
13  * The above copyright notice and this permission notice shall be included in all
-
14  * copies or substantial portions of the Software.
-
15  *
-
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-
22  * SOFTWARE.
-
23  */
-
24 
-
25 #ifndef _WATCH_UTILITY_H_INCLUDED
-
26 #define _WATCH_UTILITY_H_INCLUDED
-
28 
-
29 #include "watch.h"
-
30 
-
35 
-
39 const char * watch_utility_get_weekday(watch_date_time date_time);
-
40 
-
54 uint32_t watch_utility_convert_to_unix_time(uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t utc_offset);
-
55 
-
61 uint32_t watch_utility_date_time_to_unix_time(watch_date_time date_time, uint32_t utc_offset);
-
62 
-
71 watch_date_time watch_utility_date_time_from_unix_time(uint32_t timestamp, uint32_t utc_offset);
-
72 
- -
85 
-
95 watch_date_time watch_utility_date_time_convert_zone(watch_date_time date_time, uint32_t origin_utc_offset, uint32_t destination_utc_offset);
-
96 
-
111 float watch_utility_thermistor_temperature(uint16_t value, bool highside, float b_coefficient, float nominal_temperature, float nominal_resistance, float series_resistance);
-
112 
-
113 #endif
+
1/*
+
2 * MIT License
+
3 *
+
4 * Copyright (c) 2021 Joey Castillo
+
5 *
+
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
+
7 * of this software and associated documentation files (the "Software"), to deal
+
8 * in the Software without restriction, including without limitation the rights
+
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+
10 * copies of the Software, and to permit persons to whom the Software is
+
11 * furnished to do so, subject to the following conditions:
+
12 *
+
13 * The above copyright notice and this permission notice shall be included in all
+
14 * copies or substantial portions of the Software.
+
15 *
+
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+
22 * SOFTWARE.
+
23 */
+
24
+
25#ifndef _WATCH_UTILITY_H_INCLUDED
+
26#define _WATCH_UTILITY_H_INCLUDED
+
28
+
29#include "watch.h"
+
30
+
35
+
39const char * watch_utility_get_weekday(watch_date_time date_time);
+
40
+
54uint32_t watch_utility_convert_to_unix_time(uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t utc_offset);
+
55
+
61uint32_t watch_utility_date_time_to_unix_time(watch_date_time date_time, uint32_t utc_offset);
+
62
+
71watch_date_time watch_utility_date_time_from_unix_time(uint32_t timestamp, uint32_t utc_offset);
+
72
+ +
85
+
95watch_date_time watch_utility_date_time_convert_zone(watch_date_time date_time, uint32_t origin_utc_offset, uint32_t destination_utc_offset);
+
96
+
111float watch_utility_thermistor_temperature(uint16_t value, bool highside, float b_coefficient, float nominal_temperature, float nominal_resistance, float series_resistance);
+
112
+
113#endif
float watch_utility_thermistor_temperature(uint16_t value, bool highside, float b_coefficient, float nominal_temperature, float nominal_resistance, float series_resistance)
Returns a temperature in degrees Celsius for a given thermistor voltage divider circuit.
Definition: watch_utility.c:161
watch_date_time watch_utility_date_time_from_unix_time(uint32_t timestamp, uint32_t utc_offset)
Returns the UNIX time (seconds since 1970) for a given watch_date_time struct.
Definition: watch_utility.c:79
bool watch_utility_convert_to_12_hour(watch_date_time *date_time)
Converts a watch_date_time for 12-hour display.
Definition: watch_utility.c:154
-
const char * watch_utility_get_weekday(watch_date_time date_time)
Returns a two-letter weekday for the given timestamp, suitable for display in positions 0-1 of the wa...
Definition: watch_utility.c:28
watch_date_time watch_utility_date_time_convert_zone(watch_date_time date_time, uint32_t origin_utc_offset, uint32_t destination_utc_offset)
Converts a time from a given time zone to another time zone.
Definition: watch_utility.c:149
uint32_t watch_utility_convert_to_unix_time(uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t utc_offset)
Returns the UNIX time (seconds since 1970) for a given date/time in UTC.
Definition: watch_utility.c:38
+
const char * watch_utility_get_weekday(watch_date_time date_time)
Returns a two-letter weekday for the given timestamp, suitable for display in positions 0-1 of the wa...
Definition: watch_utility.c:28
uint32_t watch_utility_date_time_to_unix_time(watch_date_time date_time, uint32_t utc_offset)
Returns the UNIX time (seconds since 1970) for a given watch_date_time struct.
Definition: watch_utility.c:69
Definition: watch_rtc.h:44
-- cgit v1.2.3