All Projects â†’ eerimoq â†’ async

eerimoq / async

Licence: MIT License
🔀 Asynchronous framework in C.

Programming Languages

c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to async

Drone Core
The core crate for Drone, an Embedded Operating System.
Stars: ✭ 263 (+1543.75%)
Mutual labels:  embedded, rtos, bare-metal
mdepx
MDEPX — A BSD-style RTOS
Stars: ✭ 17 (+6.25%)
Mutual labels:  embedded, rtos, bare-metal
drone-cortexm
ARM® Cortex®-M platform crate for Drone, an Embedded Operating System.
Stars: ✭ 31 (+93.75%)
Mutual labels:  embedded, rtos, bare-metal
Drone
CLI utility for Drone, an Embedded Operating System.
Stars: ✭ 114 (+612.5%)
Mutual labels:  embedded, rtos, bare-metal
Incubator Nuttx Apps
Apache NuttX Apps is a collection of tools, shells, network utilities, libraries, interpreters and can be used with the NuttX RTOS
Stars: ✭ 65 (+306.25%)
Mutual labels:  embedded, rtos
Cocoos
A cooperative operating system based on coroutines
Stars: ✭ 50 (+212.5%)
Mutual labels:  embedded, rtos
Lwesp
Lightweight Espressif AT parser library for ESP8266 and ESP32 devices.
Stars: ✭ 212 (+1225%)
Mutual labels:  embedded, rtos
drone-stm32-map
STM32 peripheral mappings for Drone, an Embedded Operating System.
Stars: ✭ 16 (+0%)
Mutual labels:  rtos, bare-metal
Zephyr
Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
Stars: ✭ 5,335 (+33243.75%)
Mutual labels:  embedded, rtos
Helios
The free embedded operating system.
Stars: ✭ 223 (+1293.75%)
Mutual labels:  embedded, rtos
FreeRTOS-rust
Rust crate for FreeRTOS
Stars: ✭ 159 (+893.75%)
Mutual labels:  embedded, rtos
CML
Fast, safe and easy to use Cortex-M HAL Library, written in C++ 17
Stars: ✭ 17 (+6.25%)
Mutual labels:  embedded, bare-metal
Memfault Firmware Sdk
Memfault Firmware SDK for embedded systems. More information at https://docs.memfault.com.
Stars: ✭ 42 (+162.5%)
Mutual labels:  embedded, rtos
Awesome Embedded
A curated list of awesome embedded programming.
Stars: ✭ 831 (+5093.75%)
Mutual labels:  embedded, rtos
Incubator Nuttx
Apache NuttX is a mature, real-time embedded operating system (RTOS)
Stars: ✭ 591 (+3593.75%)
Mutual labels:  embedded, rtos
Baremetal Arm
An ebook about bare-metal programming for ARM
Stars: ✭ 222 (+1287.5%)
Mutual labels:  embedded, bare-metal
uC-CPU
Designed with Micriμm's renowned quality, scalability and reliability, the purpose of μC/ CPU is to provide a clean, organized ANSI C implementation of each processor's/compiler's hardware-dependent.
Stars: ✭ 31 (+93.75%)
Mutual labels:  embedded, rtos
Distortos
object-oriented C++ RTOS for microcontrollers
Stars: ✭ 354 (+2112.5%)
Mutual labels:  embedded, rtos
Qpc
QP/C real-time embedded framework/RTOS for embedded systems based on active objects (actors) and hierarchical state machines
Stars: ✭ 379 (+2268.75%)
Mutual labels:  embedded, rtos
dtask
DTask is a scheduler for statically dependent tasks.
Stars: ✭ 17 (+6.25%)
Mutual labels:  embedded, rtos

buildstatus codecov nala

🔀 Async

Asynchronous framework in C for systems where low memory usage is important.

Features

  • Delayed (asynchronous) function calls.
  • Timers.
  • An MQTT client (only QoS 0 is supported).
  • A simple shell.
  • TCP client and server.
  • Secure communication with SSL/TLS.

Project homepage: https://github.com/eerimoq/async

Releases: https://github.com/eerimoq/async/releases

Examples

The hello world example, printing 'Hello world!' periodically.

#include <stdio.h>
#include "async.h"

static void on_timeout()
{
    printf("Hello world!\n");
}

int main()
{
    struct async_t async;
    struct async_timer_t timer;

    async_init(&async);
    async_set_runtime(&async, async_runtime_create());
    async_timer_init(&timer, on_timeout, NULL, 0, 1000, &async);
    async_timer_start(&timer);
    async_run_forever(&async);

    return (0);
}

There are more examples in the examples folder.

Runtimes

A runtime implements zero or more of the following features:

  • Timer handling.
  • Networking (TCP).
  • Call functions in the worker pool.
  • Call functions from any thread.

Default

The default runtime does not implement any runtime features. It's designed for minimal dependencies and easy integration in any application.

Typical usage:

async_init(&async);
...
while (true) {
    epoll_wait(...);
    ...
    if (timeout) {
        async_tick(&async);
    }
    async_process(&async);
}

Native

The native runtime implements all runtime features.

Typical usage:

async_init(&async);
async_set_runtime(&async, async_runtime_create());
...
async_run_forever(&async);

Design

Input

First *_input(self_p) is called to signal that data is available. Then read data with *_read(self_p, buf_p, size).

Output

Write data with *_write(self_p, buf_p, size).

Unit testing

Source the development environment setup script.

$ source setup.sh

Execute all unit tests.

$ make -s -j4 test
...

Execute tests matching given pattern.

$ make -s -j4 ARGS=core_timer test
...
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].