From 93d7f38d6797f3a145b87964f4c6aa522b513037 Mon Sep 17 00:00:00 2001 From: Alex Maestas Date: Sun, 17 Dec 2023 22:40:04 +0000 Subject: [PATCH] fix simulator build by declaring Trng type as a void pointer --- watch-library/shared/watch/watch.h | 4 ++++ watch-library/simulator/watch/watch_private.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/watch-library/shared/watch/watch.h b/watch-library/shared/watch/watch.h index 4043fdf..8ede1f6 100644 --- a/watch-library/shared/watch/watch.h +++ b/watch-library/shared/watch/watch.h @@ -96,6 +96,10 @@ void watch_reset_to_bootloader(void); */ int read(int file, char *ptr, int len); +#ifdef __EMSCRIPTEN__ +typedef void* Trng; +#endif + /** @brief Disables the TRNG, working around a silicon erratum. */ void watch_disable_TRNG(Trng* hw); diff --git a/watch-library/simulator/watch/watch_private.c b/watch-library/simulator/watch/watch_private.c index 3425341..509a30b 100644 --- a/watch-library/simulator/watch/watch_private.c +++ b/watch-library/simulator/watch/watch_private.c @@ -57,6 +57,8 @@ void _watch_disable_tcc(void) {} void _watch_enable_usb(void) {} +void watch_disable_TRNG(Trng* hw) {} + // this function ends up getting called by printf to log stuff to the USB console. int _write(int file, char *ptr, int len) { // TODO: (a2) hook to UI