Quantcast
Channel: 数字信号处理器 (DSP) & ARM® 微处理器
Viewing all articles
Browse latest Browse all 21822

帖子: DM642视频采集驱动的问题

$
0
0

这是其中的一段代码:

static Int _configPort(Ptr chanp, Ptr args)
{
Int temp;
PortObj* port = (PortObj *)chanp;
volatile Int *base = (volatile Int *)port->base;
/* configure video port control register 配置视频口控制寄存器*/
VPORT_PortParams* portParams = (VPORT_PortParams*)args;


/* enable video port 使能视频端口 */
base[_VP_PCR_OFFSET] |= VP_PCR_PEREN_ENABLE << _VP_PCR_PEREN_SHIFT;

/* reset video port 复位视频口 */
base[_VP_VPCTL_OFFSET] |=
VP_VPCTL_VPRST_RESET << _VP_VPCTL_VPRST_SHIFT;

base[_VP_VPCTL_OFFSET] = VP_VPCTL_RMK(0,0,0,portParams->vc3Polarity,
portParams->vc2Polarity,portParams->vc1Polarity,0,0,
portParams->dualChanEnable);

/* enable video port */
base[_VP_VPCTL_OFFSET] |= (VP_VPCTL_VPHLT_CLEAR << _VP_VPCTL_VPHLT_SHIFT); /* clear the video port halt bit */
port->chanObj[0].edcFxns = portParams->edcTbl[0];
port->chanObj[1].edcFxns = portParams->edcTbl[1];

IRQ_clear(IRQ_EVT_EDMAINT); //请EDMA中断
return IOM_COMPLETED; //完成

}


里面的 VP_VPCTL_RMK(0,0,0,portParams->vc3Polarity,
portParams->vc2Polarity,portParams->vc1Polarity,0,0,
portParams->dualChanEnable);是干嘛的,从工程文件里也没找到,望大神告知《《《《


Viewing all articles
Browse latest Browse all 21822

Trending Articles