创建捕获视频口通道的过程,函数调用大致为:FVID_create -> mdCreateChan -> TVP5154_open-> TVP5154_ctrl -> TVP5154_powerdown -> regSetTVP5154 ->i2c_writeReg -> PSP_i2cTransfer -> DDC_i2cTransfer
走到DDC_i2cTransfer里面的函数如下:
/* Take completion semaphore */
if (i2cObj->currBufferLen > NULL)
{
retCode = PAL_osSemTake(i2cObj->completionSem, timeout); 走到这个函数里面就出不来了。
if (retCode != PAL_SOK)
{
...............
}
}
/* To take a semaphore */
PAL_Result PAL_osSemTake(PAL_OsSemHandle hSem, Int32 mSecTimeout)
{
PAL_Result semTakeResult = PAL_SOK;
Bool semPendResult;
if( NULL != hSem )
{
/* Only allow semTake, if it is not called from main */
if (TSK_self() != (TSK_Handle)&KNL_dummy)
{
#ifdef PAL_OSSEM_ENABLE_STATIC_MEM
semPendResult = SEM_pend(&((PAL_OsSemObj *) hSem)->biosSemObj, mSecTimeout);
#else
semPendResult = SEM_pend(hSem, mSecTimeout);
#endif
if ( semPendResult == FALSE )
{
semTakeResult = PSP_E_RESOURCES;
}
else
{
semTakeResult = PAL_SOK;
}
}
}
else
{
semTakeResult = PSP_E_INVAL_PARAM;
}
return semTakeResult;
}