Sensor Watch 0.0.2
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
Loading...
Searching...
No Matches
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
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:142
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:128
bool watch_tick_animation_is_running(void)
Checks if the tick animation is currently running.
WatchIndicatorSegment
An enum listing the icons and indicators available on the watch.
Definition watch_slcd.h:45
void watch_set_pixel(uint8_t com, uint8_t seg)
Sets a pixel. Use this to manually set a pixel with a given common and segment number....
void watch_clear_colon(void)
Turns the colon segment off.
Definition watch_private_display.c:146
void watch_start_character_blink(char character, uint32_t duration)
Blinks a single character in position 7. Does not affect other positions.
void watch_clear_indicator(WatchIndicatorSegment indicator)
Clears an indicator on the LCD. Use this to turn off one of the indicator segments.
Definition watch_private_display.c:157
void watch_stop_blink(void)
Stops and clears all blinking segments.
void watch_start_tick_animation(uint32_t duration)
Begins a two-segment "tick-tock" animation in position 8.
void watch_clear_all_indicators(void)
Clears all indicator segments.
Definition watch_private_display.c:164
void watch_set_indicator(WatchIndicatorSegment indicator)
Sets an indicator on the LCD. Use this to turn on one of the indicator segments.
Definition watch_private_display.c:150
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....
void watch_clear_display(void)
Clears all segments of the display, including incicators and the colon.
void watch_stop_tick_animation(void)
Stops the tick/tock animation and clears all animating segments.
@ WATCH_INDICATOR_PM
The PM indicator, indicating that a time is in the afternoon.
Definition watch_slcd.h:48
@ WATCH_INDICATOR_BELL
The small bell indicating that an alarm is set.
Definition watch_slcd.h:47
@ WATCH_INDICATOR_SIGNAL
The hourly signal indicator; also useful for indicating that sensors are on.
Definition watch_slcd.h:46
@ WATCH_INDICATOR_LAP
The LAP indicator; the F-91W uses this in its stopwatch UI.
Definition watch_slcd.h:50
@ WATCH_INDICATOR_24H
The 24H indicator, indicating that the watch is in a 24-hour mode.
Definition watch_slcd.h:49