mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-19 03:13:14 +00:00
- Created `tactility-headless` to support ESP32 firmwares that don't require graphics - `tactility` subproject now contains both PC and ESP32 code (to avoid having to split up `tactility` and `tactility-headless` into separate projects, which would result in a very complex dependency tree) - `tactility` subproject is now defined as component for ESP32 and as regular module for PC - Improvements for dispatcher - Added `project-structure.puml` to docs - `Gui` service now depends on `Loader` service instead of the reverse - Added `statusbar_updater` service for updating Wi-Fi and SD card icons
27 lines
554 B
C
27 lines
554 B
C
/**
|
|
* @file dispatcher.h
|
|
*
|
|
* Dispatcher is a thread-safe code execution queue.
|
|
*/
|
|
#pragma once
|
|
|
|
#include "message_queue.h"
|
|
#include "mutex.h"
|
|
#include <stdbool.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef void (*Callback)(void* data);
|
|
|
|
typedef void Dispatcher;
|
|
|
|
Dispatcher* tt_dispatcher_alloc(uint32_t message_count);
|
|
void tt_dispatcher_free(Dispatcher* dispatcher);
|
|
void tt_dispatcher_dispatch(Dispatcher* data, Callback callback, void* context);
|
|
bool tt_dispatcher_consume(Dispatcher* data, uint32_t timeout_ticks);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif |