mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-18 10:51:54 +03: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);
|