summaryrefslogtreecommitdiffstats
path: root/watch-library/shared/watch/watch.h
diff options
context:
space:
mode:
authorJoey Castillo <joeycastillo@utexas.edu>2022-05-08 20:19:20 -0400
committerJoey Castillo <joeycastillo@utexas.edu>2022-05-08 20:19:20 -0400
commit661e2b6a731da3b4b309b331bfbd40a29a69d7e9 (patch)
tree817515509e5e6e4d6c020d0a1042487b369dd43b /watch-library/shared/watch/watch.h
parent838102a7e9ccfddf8f901def6cad35e66bf2d0fd (diff)
downloadSensor-Watch-661e2b6a731da3b4b309b331bfbd40a29a69d7e9.tar.gz
Sensor-Watch-661e2b6a731da3b4b309b331bfbd40a29a69d7e9.tar.bz2
Sensor-Watch-661e2b6a731da3b4b309b331bfbd40a29a69d7e9.zip
add ability to read from USB serial
Diffstat (limited to 'watch-library/shared/watch/watch.h')
-rw-r--r--watch-library/shared/watch/watch.h8
1 files changed, 8 insertions, 0 deletions
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