From d4ebe64af05e2fa163bcea0dd699ae9c8934cc6f Mon Sep 17 00:00:00 2001 From: Joey Castillo Date: Fri, 6 May 2022 17:06:27 -0400 Subject: add support for a small filesystem on the watch --- watch-library/shared/watch/watch.h | 1 + 1 file changed, 1 insertion(+) (limited to 'watch-library/shared/watch/watch.h') diff --git a/watch-library/shared/watch/watch.h b/watch-library/shared/watch/watch.h index ce85eed3..1dd8e7f7 100644 --- a/watch-library/shared/watch/watch.h +++ b/watch-library/shared/watch/watch.h @@ -64,6 +64,7 @@ #include "watch_i2c.h" #include "watch_spi.h" #include "watch_uart.h" +#include "watch_storage.h" #include "watch_deepsleep.h" #include "watch_private.h" -- cgit v1.2.3 From 661e2b6a731da3b4b309b331bfbd40a29a69d7e9 Mon Sep 17 00:00:00 2001 From: Joey Castillo Date: Sun, 8 May 2022 20:19:20 -0400 Subject: add ability to read from USB serial --- watch-library/shared/watch/watch.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'watch-library/shared/watch/watch.h') diff --git a/watch-library/shared/watch/watch.h b/watch-library/shared/watch/watch.h index 1dd8e7f7..b307feca 100644 --- a/watch-library/shared/watch/watch.h +++ b/watch-library/shared/watch/watch.h @@ -76,4 +76,12 @@ */ bool watch_is_buzzer_or_led_enabled(void); +/** @brief Reads up to len bytes from the USB serial. + * @param file ignored, you can pass in 0 + * @param ptr pointer to a buffer of at least len bytes + * @param len the number of bytes you wish to read, max 256. + * @return The number of bytes read, or zero if no bytes were read. + */ +int read(int file, char *ptr, int len); + #endif /* WATCH_H_ */ \ No newline at end of file -- cgit v1.2.3 From 22b1ac0283a6aed800ea86960305284199747cdc Mon Sep 17 00:00:00 2001 From: Joey Castillo Date: Mon, 9 May 2022 12:55:58 -0400 Subject: simulator: add USB serial input field --- watch-library/shared/watch/watch.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'watch-library/shared/watch/watch.h') diff --git a/watch-library/shared/watch/watch.h b/watch-library/shared/watch/watch.h index b307feca..b94d36fb 100644 --- a/watch-library/shared/watch/watch.h +++ b/watch-library/shared/watch/watch.h @@ -76,6 +76,10 @@ */ bool watch_is_buzzer_or_led_enabled(void); +/** @brief Returns true if USB is enabled. + */ +bool watch_is_usb_enabled(void); + /** @brief Reads up to len bytes from the USB serial. * @param file ignored, you can pass in 0 * @param ptr pointer to a buffer of at least len bytes -- cgit v1.2.3