Skip to content

❄ Frost OS ❄ is an async multi-task operating system for embedded hardware, which supports await/async function calling, TLS(Task Local Storage).

License

Notifications You must be signed in to change notification settings

TheSnowfield/frost

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

❄ Frost OS

Frost OS is an async multi-task operating system for embedded hardware,
which supports await/async function calling, and TLS(Task Local Storage).

Frost doesn't interrupt the task execution, so it's not a real-time operating system.

It owns an advanced task scheduler that can run two task types:

  • one shot: task runs one shot, then deletes itself
  • periodic: task runs periodically, with a given period (setInterval)

It also supported a Golang-like "channel" feature which be used to communicate between tasks. (WIP)

frost license

❄ Example

This is a simple example of toggling a LED every 1 second in Arduino:

#include <frost/api.h>

void __task_led_toggle() {
  static int led_state = 0;
  digitalWrite(LED_BUILTIN, led_state);
  led_state = !led_state;
}

void setup() {
  
  // frost init
  frost_init();

  // create a periodic task as a 1000ms interval
  frost_task_interval(&__task_led_toggle, 1000, NULL);
}

void loop() {

  // run frost scheduler
  frost_schedule_tasks();
}

❄ Porting Frost

Please port below functions to your platform to make Frost work:

void __frost_log_print(const char* tag, const char* fmt, ...) {
  // Your platform implementation
}

uint64_t __frost_time_tick(uint64_t* tick) {
  // Your platform implementation
}

And markup FROST_PORTED_LOG_PRINT and FROST_PORTED_TIME_TICK before you include the Frost header.
See more in frost/port.h

❄ LICENSE

Frost is licensed under the MIT License with ❤.

About

❄ Frost OS ❄ is an async multi-task operating system for embedded hardware, which supports await/async function calling, TLS(Task Local Storage).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published