20 #ifndef MBEDTLS_SLPAL_UCOS3_H
21 #define MBEDTLS_SLPAL_UCOS3_H
23 #if !defined(MBEDTLS_CONFIG_FILE)
26 #include MBEDTLS_CONFIG_FILE
29 #if defined( MBEDTLS_UCOS3 )
40 #define SLPAL_WAIT_FOREVER (0)
43 #define SLPAL_NON_BLOCKING (-1)
46 #if defined(MBEDTLS_CRYPTO_IRQ_PRIORITY)
47 #define SLPAL_CRYPTO_IRQ_PRIORITY MBEDTLS_CRYPTO_IRQ_PRIORITY
49 #define SLPAL_CRYPTO_IRQ_PRIORITY ( 0 )
55 #define UCOS3_LOWEST_TASK_PRIO (OS_CFG_PRIO_MAX-2)
59 #define SLPAL_MAX_PRIORITY (UCOS3_LOWEST_TASK_PRIO)
116 CPU_SR cpu_sr = (CPU_SR) irqState;
158 return (
unsigned long) (UCOS3_LOWEST_TASK_PRIO - OSTCBCurPtr->Prio);
174 OSSemCreate((OS_SEM *) pComp, NULL, (OS_SEM_CTR) 0, &err);
175 EFM_ASSERT(err == OS_ERR_NONE);
192 OSSemDel((OS_SEM *) pComp, OS_OPT_DEL_ALWAYS, &err);
193 EFM_ASSERT(err == OS_ERR_NONE);
218 OSSemPend((OS_SEM *) pComp,
221 OS_OPT_PEND_NON_BLOCKING : OS_OPT_PEND_BLOCKING),
224 if (err == OS_ERR_NONE)
230 if ( (err == OS_ERR_TIMEOUT) || (err == OS_ERR_PEND_WOULD_BLOCK) )
258 OSSemPost((OS_SEM*) pComp, (OS_OPT) OS_OPT_POST_1, &err);
259 EFM_ASSERT(err == OS_ERR_NONE);
276 OSMutexCreate((OS_MUTEX *) pMutex, NULL, &err);
277 EFM_ASSERT(err == OS_ERR_NONE);
294 OSMutexDel((OS_MUTEX *) pMutex, OS_OPT_DEL_ALWAYS, &err);
295 EFM_ASSERT(err == OS_ERR_NONE);
320 OSMutexPend((OS_MUTEX *) pMutex,
323 OS_OPT_PEND_NON_BLOCKING : OS_OPT_PEND_BLOCKING),
326 if (err == OS_ERR_NONE)
332 if ( (err == OS_ERR_TIMEOUT) || (err == OS_ERR_PEND_WOULD_BLOCK) )
360 OSMutexPost((OS_MUTEX*) pMutex, (OS_OPT) OS_OPT_POST_NONE, &err);
361 EFM_ASSERT(err == OS_ERR_NONE);
uint32_t SLPAL_irqState_t
Storage for PRIMASK or BASEPRI value used for SLPAL critical regions.
#define SLPAL_ERROR_OS_SPECIFIC
Compatibility names (set of defines)
#define SLPAL_ERROR_TIMEOUT