From 51e357d8224e3d740f4ab9ed6d6fc0de4fdb9d4c Mon Sep 17 00:00:00 2001 From: Joey Castillo Date: Sat, 2 Apr 2022 10:06:08 -0400 Subject: movement: final list of watch faces for stock firmware --- watch-library/simulator/watch/watch_adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'watch-library/simulator') diff --git a/watch-library/simulator/watch/watch_adc.c b/watch-library/simulator/watch/watch_adc.c index 364e2119..b03d68cb 100644 --- a/watch-library/simulator/watch/watch_adc.c +++ b/watch-library/simulator/watch/watch_adc.c @@ -29,7 +29,7 @@ void watch_enable_adc(void) {} void watch_enable_analog_input(const uint8_t pin) {} uint16_t watch_get_analog_pin_level(const uint8_t pin) { - return 0; + return 32767; // pretend it's half of VCC } void watch_set_analog_num_samples(uint16_t samples) {} -- cgit v1.2.3 From 6bdaff5d2abaeb614e98de2c9e5d0a02b439fa8f Mon Sep 17 00:00:00 2001 From: Joey Castillo Date: Sun, 10 Apr 2022 15:56:45 -0400 Subject: remove all deprecated functions --- watch-library/simulator/watch/watch_deepsleep.c | 12 ---------- watch-library/simulator/watch/watch_extint.c | 8 ------- watch-library/simulator/watch/watch_led.c | 10 --------- watch-library/simulator/watch/watch_private.c | 9 -------- watch-library/simulator/watch/watch_rtc.c | 29 ------------------------- watch-library/simulator/watch/watch_uart.c | 11 ---------- 6 files changed, 79 deletions(-) (limited to 'watch-library/simulator') diff --git a/watch-library/simulator/watch/watch_deepsleep.c b/watch-library/simulator/watch/watch_deepsleep.c index a12cf2a6..5add05e8 100644 --- a/watch-library/simulator/watch/watch_deepsleep.c +++ b/watch-library/simulator/watch/watch_deepsleep.c @@ -86,15 +86,3 @@ void watch_enter_backup_mode(void) { // go into backup sleep mode (5). when we exit, the reset controller will take over. // sleep(5); } - -// deprecated -void watch_enter_shallow_sleep(bool display_on) { - if (display_on) watch_enter_sleep_mode(); - else watch_enter_deep_sleep_mode(); -} - -// deprecated -void watch_enter_deep_sleep(void) { - watch_register_extwake_callback(BTN_ALARM, NULL, true); - watch_enter_backup_mode(); -} diff --git a/watch-library/simulator/watch/watch_extint.c b/watch-library/simulator/watch/watch_extint.c index 03abe42c..cbba4c3d 100644 --- a/watch-library/simulator/watch/watch_extint.c +++ b/watch-library/simulator/watch/watch_extint.c @@ -181,11 +181,3 @@ void watch_register_interrupt_callback(const uint8_t pin, ext_irq_cb_t callback, external_interrupt_alarm_trigger = trigger; } } - -void watch_register_button_callback(const uint8_t pin, ext_irq_cb_t callback) { - watch_register_interrupt_callback(pin, callback, INTERRUPT_TRIGGER_RISING); -} - -void watch_enable_buttons(void) { - watch_enable_external_interrupts(); -} diff --git a/watch-library/simulator/watch/watch_led.c b/watch-library/simulator/watch/watch_led.c index 173f1b08..068da8bd 100644 --- a/watch-library/simulator/watch/watch_led.c +++ b/watch-library/simulator/watch/watch_led.c @@ -30,16 +30,6 @@ void watch_enable_leds(void) {} void watch_disable_leds(void) {} -void watch_enable_led(bool unused) { - (void)unused; - watch_enable_leds(); -} - -void watch_disable_led(bool unused) { - (void)unused; - watch_disable_leds(); -} - void watch_set_led_color(uint8_t red, uint8_t green) { EM_ASM({ document.getElementById('light').style.opacity = $1 / 255; diff --git a/watch-library/simulator/watch/watch_private.c b/watch-library/simulator/watch/watch_private.c index b852893b..4ddc2182 100644 --- a/watch-library/simulator/watch/watch_private.c +++ b/watch-library/simulator/watch/watch_private.c @@ -67,12 +67,3 @@ int _write(int file, char *ptr, int len) { int _read(void) { return 0; } - -// Alternate function that outputs to the debug UART. useful for debugging USB issues. -// int _write(int file, char *ptr, int len) { -// (void)file; -// int pos = 0; -// while(pos < len) watch_debug_putc(ptr[pos++]); - -// return 0; -// } diff --git a/watch-library/simulator/watch/watch_rtc.c b/watch-library/simulator/watch/watch_rtc.c index ea8659dc..107ae56c 100644 --- a/watch-library/simulator/watch/watch_rtc.c +++ b/watch-library/simulator/watch/watch_rtc.c @@ -197,32 +197,3 @@ void watch_rtc_disable_alarm_callback(void) { alarm_interval_id = -1; } } - -/////////////////////// -// Deprecated functions - -void watch_set_date_time(struct calendar_date_time date_time) { - watch_date_time val; - val.unit.second = date_time.time.sec; - val.unit.minute = date_time.time.min; - val.unit.hour = date_time.time.hour; - val.unit.day = date_time.date.day; - val.unit.month = date_time.date.month; - val.unit.year = date_time.date.year - WATCH_RTC_REFERENCE_YEAR; - watch_rtc_set_date_time(val); -} - -void watch_get_date_time(struct calendar_date_time *date_time) { - if (date_time == NULL) return; - watch_date_time val = watch_rtc_get_date_time(); - date_time->time.sec = val.unit.second; - date_time->time.min = val.unit.minute; - date_time->time.hour = val.unit.hour; - date_time->date.day = val.unit.day; - date_time->date.month = val.unit.month; - date_time->date.year = val.unit.year + WATCH_RTC_REFERENCE_YEAR; -} - -void watch_register_tick_callback(ext_irq_cb_t callback) { - watch_rtc_register_tick_callback(callback); -} diff --git a/watch-library/simulator/watch/watch_uart.c b/watch-library/simulator/watch/watch_uart.c index 7043383c..80c6a812 100644 --- a/watch-library/simulator/watch/watch_uart.c +++ b/watch-library/simulator/watch/watch_uart.c @@ -45,14 +45,3 @@ char watch_uart_getc(void) { } return 0; } - -void watch_enable_debug_uart(uint32_t baud) {} - -void watch_debug_putc(char c) {} - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -void watch_debug_puts(char *s) { - while (*s) watch_debug_putc(*s++); -} -#pragma GCC diagnostic pop -- cgit v1.2.3