remove all deprecated functions

This commit is contained in:
Joey Castillo
2022-04-10 15:56:45 -04:00
parent 35172ce11a
commit 6bdaff5d2a
17 changed files with 0 additions and 275 deletions

View File

@@ -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();
}

View File

@@ -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();
}

View File

@@ -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;

View File

@@ -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;
// }

View File

@@ -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);
}

View File

@@ -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