Prusa MINI Firmware overview
|
◆ sys_sem_new()
Create a new semaphore
- Parameters
-
sem | pointer to the semaphore to create |
count | initial count of the semaphore |
- Returns
- ERR_OK if successful, another err_t otherwise
215 ++lwip_stats.sys.sem.err;
226 ++lwip_stats.sys.sem.used;
227 if (lwip_stats.sys.sem.max < lwip_stats.sys.sem.used) {
228 lwip_stats.sys.sem.max = lwip_stats.sys.sem.used;
◆ sys_sem_signal()
Signals a semaphore
- Parameters
-
sem | the semaphore to signal |
◆ sys_arch_sem_wait()
Wait for a semaphore for the specified timeout
- Parameters
-
sem | the semaphore to wait for |
timeout | timeout in milliseconds to wait (0 = wait forever) |
- Returns
- time (in milliseconds) waited for the semaphore or SYS_ARCH_TIMEOUT on timeout
◆ sys_sem_free()
Delete a semaphore
- Parameters
-
285 --lwip_stats.sys.sem.used;
◆ sys_sem_valid()
Check if a semaphore is valid/allocated: return 1 for valid, 0 for invalid
◆ sys_sem_set_invalid()
Set a semaphore invalid so that sys_sem_valid returns 0
uint32_t osKernelSysTick(void)
Get the value of the Kernel SysTick timer.
Definition: cmsis_os.c:227
#define osSemaphore(name)
Definition: cmsis_os.h:709
int32_t osSemaphoreWait(osSemaphoreId semaphore_id, uint32_t millisec)
Wait until a Semaphore token becomes available.
Definition: cmsis_os.c:822
#define NULL
Definition: usbd_def.h:53
osStatus osSemaphoreDelete(osSemaphoreId semaphore_id)
Delete a Semaphore.
Definition: cmsis_os.c:889
osSemaphoreId osSemaphoreCreate(const osSemaphoreDef_t *semaphore_def, int32_t count)
Create and Initialize a Semaphore object used for managing resources.
Definition: cmsis_os.c:755
#define osSemaphoreDef(name)
Definition: cmsis_os.h:700
function completed; no error or event occurred.
Definition: cmsis_os.h:235
#define osWaitForever
wait forever timeout value
Definition: cmsis_os.h:230
#define SYS_SEM_NULL
Definition: sys_arch.h:38
#define SYS_ARCH_TIMEOUT
Definition: sys.h:87
osStatus osSemaphoreRelease(osSemaphoreId semaphore_id)
Release a Semaphore token.
Definition: cmsis_os.c:862