EDMA3 Driver Porting
I-A-101
/* Function to take OS Semaphore */
EDMA3_DRV_Result edma3OsSemTake(EDMA3_OS_Sem_Handle hSem, int mSecTimeout)
{
EDMA3_DRV_Result semTakeResult = EDMA3_DRV_SOK;
unsigned short semPendResult;
if(NULL == hSem)
{
semTakeResult = EDMA3_DRV_E_INVALID_PARAM;
}
else
{
if (TSK_self() != (TSK_Handle)&KNL_dummy)
{
semPendResult = SEM_pend(hSem, mSecTimeout);
if (semPendResult == FALSE)
{
semTakeResult = EDMA3_DRV_E_SEMAPHORE;
}
}
}
return semTakeResult;
}
/* Function to give OS Semaphore */
EDMA3_DRV_Result edma3OsSemGive(EDMA3_OS_Sem_Handle hSem)
{
EDMA3_DRV_Result semGiveResult = EDMA3_DRV_SOK;
if(NULL == hSem)
{
semGiveResult = EDMA3_DRV_E_INVALID_PARAM;
}
else
{
if (TSK_self() != (TSK_Handle)&KNL_dummy)
{
SEM_post(hSem);
}
}
return semGiveResult;
}
Summary of Contents for EDMA3
Page 12: ......
Page 17: ...EDMA3 Driver Introduction I 1 5 ...
Page 20: ......
Page 40: ...Run Time Interfaces Integration Guide A 12 EDMA3_DRV_IOCTL_MAX_IOCTL Max IOCTL ...
Page 75: ...Run Time Interfaces Integration Guide I A 47 Errors EDMA3_DRV_E_INVALID_PARAM ...
Page 107: ...Run Time Interfaces Integration Guide I A 79 ...