SDK improvements (#352)

TactilityC additions for:
- C randomization functions
- Tactility app paths
- Tactility locks
This commit is contained in:
Ken Van Hoeylandt
2025-09-29 22:45:14 +02:00
committed by GitHub
parent 6dc4f698c9
commit c7621b5e4c
13 changed files with 204 additions and 18 deletions
+34
View File
@@ -0,0 +1,34 @@
#pragma once
#include "tt_kernel.h"
#ifdef __cplusplus
extern "C" {
#endif
/** A handle that represents a lock instance. A lock could be a Mutex or similar construct */
typedef void* LockHandle;
/**
* Attempt to lock the lock.
* @param[in] handle the handle that represents the mutex instance
* @param[in] timeout the maximum amount of ticks to wait when trying to lock
* @return true when the lock was acquired
*/
bool tt_lock_acquire(LockHandle handle, TickType timeout);
/**
* Attempt to unlock the lock.
* @param[in] handle the handle that represents the mutex instance
* @return true when the lock was unlocked
*/
bool tt_lock_release(LockHandle handle);
/** Free the memory for this lock
* @param[in] handle the handle that represents the mutex instance
*/
void tt_lock_free(LockHandle handle);
#ifdef __cplusplus
}
#endif