]> git.earman.xyz Git - sensor-watch.git/commitdiff
fix simulator build by declaring Trng type as a void pointer
authorAlex Maestas <git@se30.xyz>
Sun, 17 Dec 2023 22:40:04 +0000 (22:40 +0000)
committerAlex Maestas <git@se30.xyz>
Sun, 17 Dec 2023 22:40:04 +0000 (22:40 +0000)
watch-library/shared/watch/watch.h
watch-library/simulator/watch/watch_private.c

index 4043fdf7b93c843eec8eea48b0413ec7dd8e4175..8ede1f63d88054c7d095f04af348c89ac66aa032 100644 (file)
@@ -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);
index 3425341a98ae491ab70922dd826bd9b462a2a871..509a30b987a964af6f24c83de597214846244db2 100644 (file)
@@ -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