diff options
Diffstat (limited to 'watch-library/shared/watch')
-rw-r--r-- | watch-library/shared/watch/watch.h | 10 | ||||
-rw-r--r-- | watch-library/shared/watch/watch_private.h | 19 |
2 files changed, 21 insertions, 8 deletions
diff --git a/watch-library/shared/watch/watch.h b/watch-library/shared/watch/watch.h index 790f9a16..62e57a59 100644 --- a/watch-library/shared/watch/watch.h +++ b/watch-library/shared/watch/watch.h @@ -88,6 +88,10 @@ bool watch_is_usb_enabled(void); */ void watch_reset_to_bootloader(void); +/** @brief Call periodically from app main loop to service CDC RX/TX. + */ +void cdc_task(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 @@ -96,4 +100,8 @@ void watch_reset_to_bootloader(void); */ int read(int file, char *ptr, int len); -#endif /* WATCH_H_ */
\ No newline at end of file +/** @brief Disables the TRNG twice in order to work around silicon erratum 1.16.1. + */ +void watch_disable_TRNG(); + +#endif /* WATCH_H_ */ diff --git a/watch-library/shared/watch/watch_private.h b/watch-library/shared/watch/watch_private.h index 9d55bc21..8fcc5755 100644 --- a/watch-library/shared/watch/watch_private.h +++ b/watch-library/shared/watch/watch_private.h @@ -38,14 +38,19 @@ void _watch_enable_tcc(void); /// Called by buzzer and LED teardown functions. You should not call this from your app. void _watch_disable_tcc(void); -/// Called by main.c if plugged in to USB. You should not call this from your app. -void _watch_enable_usb(void); +/// Enable USB task timer. Called by USB enable routine in main(). You should not call this from your app. +void _watch_enable_tc0(void); + +/// Disable USB task timer. You should not call this from your app. +void _watch_disable_tc0(void); -// this function ends up getting called by printf to log stuff to the USB console. -int _write(int file, char *ptr, int len); +/// Enable CDC task timer. Called by USB enable routine in main(). You should not call this from your app. +void _watch_enable_tc1(void); -// i thought this would be called by gets but it doesn't? anyway it does get called by read() -// so that's our mechanism for reading data from the USB serial console. -int _read(int file, char *ptr, int len); +/// Disable CDC task timer. You should not call this from your app. +void _watch_disable_tc1(void); + +/// Called by main.c if plugged in to USB. You should not call this from your app. +void _watch_enable_usb(void); #endif |