System functions

System function are used in conjunction with thread safety. Please check Thread safety section for more information

group LWPRINTF_SYS

System functions when used with operating system.

Functions

uint8_t lwprintf_sys_mutex_create(LWPRINTF_CFG_OS_MUTEX_HANDLE *m)

Create a new mutex and assign value to handle.

Parameters

m[out] Output variable to save mutex handle

Returns

1 on success, 0 otherwise

uint8_t lwprintf_sys_mutex_isvalid(LWPRINTF_CFG_OS_MUTEX_HANDLE *m)

Check if mutex handle is valid.

Parameters

m[in] Mutex handle to check if valid

Returns

1 on success, 0 otherwise

uint8_t lwprintf_sys_mutex_wait(LWPRINTF_CFG_OS_MUTEX_HANDLE *m)

Wait for a mutex until ready (unlimited time)

Parameters

m[in] Mutex handle to wait for

Returns

1 on success, 0 otherwise

uint8_t lwprintf_sys_mutex_release(LWPRINTF_CFG_OS_MUTEX_HANDLE *m)

Release already locked mutex.

Parameters

m[in] Mutex handle to release

Returns

1 on success, 0 otherwise