mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-04-23 03:45:05 +00:00
* app loading wip * various improvements irq/isr stuff is now working lvgl locking where needed hello world now uses proper mutex for app unlocking etc? * various improvements * cmsis_esp improvements * implement interrupts
20 lines
534 B
C
20 lines
534 B
C
#pragma once
|
|
#include "furi.h"
|
|
|
|
typedef FuriEventFlag* FuriApiLock;
|
|
|
|
#define API_LOCK_EVENT (1U << 0)
|
|
|
|
#define api_lock_alloc_locked() furi_event_flag_alloc()
|
|
|
|
#define api_lock_wait_unlock(_lock) \
|
|
furi_event_flag_wait(_lock, API_LOCK_EVENT, FuriFlagWaitAny, FuriWaitForever)
|
|
|
|
#define api_lock_free(_lock) furi_event_flag_free(_lock)
|
|
|
|
#define api_lock_unlock(_lock) furi_event_flag_set(_lock, API_LOCK_EVENT)
|
|
|
|
#define api_lock_wait_unlock_and_free(_lock) \
|
|
api_lock_wait_unlock(_lock); \
|
|
api_lock_free(_lock);
|