mirror of
https://github.com/joeycastillo/gossamer.git
synced 2025-10-30 03:31:01 +00:00
emscripten fixes
This commit is contained in:
parent
7b05aac4b6
commit
3f51d18c4a
@ -26,7 +26,6 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "tusb.h"
|
|
||||||
|
|
||||||
/** @brief Initializes the USB preipheral, and assigns the USB pins to their
|
/** @brief Initializes the USB preipheral, and assigns the USB pins to their
|
||||||
* relevant functions. In the process, this function also sets up the
|
* relevant functions. In the process, this function also sets up the
|
||||||
|
|||||||
8
main.c
8
main.c
@ -8,6 +8,10 @@
|
|||||||
#include "system.h"
|
#include "system.h"
|
||||||
#include "delay.h"
|
#include "delay.h"
|
||||||
|
|
||||||
|
#if __EMSCRIPTEN__
|
||||||
|
void resume_main_loop(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
// set up system clocks
|
// set up system clocks
|
||||||
sys_init();
|
sys_init();
|
||||||
@ -24,6 +28,9 @@ int main(void) {
|
|||||||
// allow application to do its initial setup
|
// allow application to do its initial setup
|
||||||
app_setup();
|
app_setup();
|
||||||
|
|
||||||
|
#if __EMSCRIPTEN__
|
||||||
|
resume_main_loop();
|
||||||
|
#else
|
||||||
while (1) {
|
while (1) {
|
||||||
bool can_sleep = app_loop();
|
bool can_sleep = app_loop();
|
||||||
|
|
||||||
@ -31,6 +38,7 @@ int main(void) {
|
|||||||
_enter_standby_mode();
|
_enter_standby_mode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user