summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--watch-library/shared/watch/watch.h4
-rw-r--r--watch-library/simulator/main.c4
-rw-r--r--watch-library/simulator/watch/watch_main_loop.h2
3 files changed, 10 insertions, 0 deletions
diff --git a/watch-library/shared/watch/watch.h b/watch-library/shared/watch/watch.h
index 7526d03a..790f9a16 100644
--- a/watch-library/shared/watch/watch.h
+++ b/watch-library/shared/watch/watch.h
@@ -30,6 +30,10 @@
#include "driver_init.h"
#include "pins.h"
+#ifdef __EMSCRIPTEN__
+#include "watch_main_loop.h"
+#endif // __EMSCRIPTEN__
+
/** @mainpage Sensor Watch Documentation
* @brief This documentation covers most of the functions you will use to interact with the Sensor Watch
hardware. It is divided into the following sections:
diff --git a/watch-library/simulator/main.c b/watch-library/simulator/main.c
index ac9db6ac..6898fd06 100644
--- a/watch-library/simulator/main.c
+++ b/watch-library/simulator/main.c
@@ -101,6 +101,10 @@ static void main_loop_set_sleeping(bool sleeping) {
}, sleeping);
}
+void delay_ms(const uint16_t ms) {
+ main_loop_sleep(ms);
+}
+
int main(void) {
app_init();
_watch_init();
diff --git a/watch-library/simulator/watch/watch_main_loop.h b/watch-library/simulator/watch/watch_main_loop.h
index 82351919..7599f727 100644
--- a/watch-library/simulator/watch/watch_main_loop.h
+++ b/watch-library/simulator/watch/watch_main_loop.h
@@ -31,3 +31,5 @@ void resume_main_loop(void);
void main_loop_sleep(uint32_t ms);
bool main_loop_is_sleeping(void);
+
+void delay_ms(const uint16_t ms);