Merge pull request #93 from wryun/make-starter-proj-work-in-simulator

Make starter project work in simulator
This commit is contained in:
joeycastillo 2022-10-11 22:14:13 -05:00 committed by GitHub
commit 4d860f482e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 0 deletions

View File

@ -30,6 +30,10 @@
#include "driver_init.h" #include "driver_init.h"
#include "pins.h" #include "pins.h"
#ifdef __EMSCRIPTEN__
#include "watch_main_loop.h"
#endif // __EMSCRIPTEN__
/** @mainpage Sensor Watch Documentation /** @mainpage Sensor Watch Documentation
* @brief This documentation covers most of the functions you will use to interact with the Sensor Watch * @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: hardware. It is divided into the following sections:

View File

@ -101,6 +101,10 @@ static void main_loop_set_sleeping(bool sleeping) {
}, sleeping); }, sleeping);
} }
void delay_ms(const uint16_t ms) {
main_loop_sleep(ms);
}
int main(void) { int main(void) {
app_init(); app_init();
_watch_init(); _watch_init();

View File

@ -31,3 +31,5 @@ void resume_main_loop(void);
void main_loop_sleep(uint32_t ms); void main_loop_sleep(uint32_t ms);
bool main_loop_is_sleeping(void); bool main_loop_is_sleeping(void);
void delay_ms(const uint16_t ms);