mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-24 05:23:06 +00:00
8 lines
267 B
C
8 lines
267 B
C
|
#pragma once
|
||
|
#define API_LOCK_INIT_LOCKED() osSemaphoreNew(1, 0, NULL);
|
||
|
|
||
|
#define API_LOCK_WAIT_UNTIL_UNLOCK_AND_FREE(_lock) \
|
||
|
osSemaphoreAcquire(_lock, osWaitForever); \
|
||
|
osSemaphoreDelete(_lock);
|
||
|
|
||
|
#define API_LOCK_UNLOCK(_lock) osSemaphoreRelease(_lock);
|