Skip to content

Commit 93d7f38

Browse files
author
Alex Maestas
committed
fix simulator build by declaring Trng type as a void pointer
1 parent 68f3865 commit 93d7f38

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

watch-library/shared/watch/watch.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ void watch_reset_to_bootloader(void);
9696
*/
9797
int read(int file, char *ptr, int len);
9898

99+
#ifdef __EMSCRIPTEN__
100+
typedef void* Trng;
101+
#endif
102+
99103
/** @brief Disables the TRNG, working around a silicon erratum.
100104
*/
101105
void watch_disable_TRNG(Trng* hw);

watch-library/simulator/watch/watch_private.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ void _watch_disable_tcc(void) {}
5757

5858
void _watch_enable_usb(void) {}
5959

60+
void watch_disable_TRNG(Trng* hw) {}
61+
6062
// this function ends up getting called by printf to log stuff to the USB console.
6163
int _write(int file, char *ptr, int len) {
6264
// TODO: (a2) hook to UI

0 commit comments

Comments
 (0)