Skip to content

how to achieve more granular polling for TI-RTOS? #1677

Discussion options

You must be logged in to vote

I'm checking the example code, and as far as I can see that does not use TI RTOS.
The fastest approach is perhaps you defining MG_ENABLE_CUSTOM_MILLIS and providing your own uint64_t mg_millis(void) implementation returning up time in milliseconds; as I think you already did.
It should be fine if you just return up time, ports to some architectures do just that:

mongoose/src/util.c

Lines 90 to 128 in 01390fe

#if MG_ENABLE_CUSTOM_MILLIS
#else
uint64_t mg_millis(void) {
#if MG_ARCH == MG_ARCH_WIN32
return GetTickCount();
#elif MG_ARCH == MG_ARCH_RP2040
return time_us_64() / 1000;
#elif MG_ARCH == MG_ARCH_ESP32
return esp_timer_get_time() / 1…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@scaprile
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by keffkeff
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants