cesanta / mongoose-os

Mongoose OS - an IoT Firmware Development Framework. Supported microcontrollers: ESP32, ESP8266, CC3220, CC3200, STM32F4, STM32L4, STM32F7. Amazon AWS IoT, Microsoft Azure, Google IoT Core integrated. Code in C or JavaScript.
https://mongoose-os.com
Other
2.51k stars 429 forks source link

Can you please export following defines/macros? #554

Open Harvie opened 4 years ago

Harvie commented 4 years ago

Hello, i have developed module which adds multithreaded event loop functionality to mgos ( see #537 ). And it seems to work great! But i had to copypaste following mongoose defines from .c files, because they cannot be included in the form of header files. Can you please export following defines in some header file, so i can include it directly rather than copypasting to my module?

#define MGOS_TASK_PRIORITY 5
#define STACK_SIZE_UNIT 1
#define MGOS_TASK_QUEUE_LENGTH 32
#define MGOS_TASK_STACK_SIZE_BYTES 8192

#define YIELD_FROM_ISR(should_yield)        \
  {                                         \
    if (should_yield) portYIELD_FROM_ISR(); \
  }

(YIELD_FROM_ISR is not really critical i guess... as i can just call portYIELD_FROM_ISR() directly in my module)

Thanks!

Harvie commented 3 years ago

@rojer Can you please help with exporting these defines?

Harvie commented 3 years ago

I made a pull request, can you please merge it? https://github.com/mongoose-os-libs/freertos/pull/2