[code=Cpp]h2p_vip_capture_addr = (lw_axi_virtual_base + ((unsigned long)
( ALT_LWFPGASLVS_OFST + ALT_VIP_CAPTURE_BASE)
& (unsigned long) ( HW_REGS_MASK)));
// Capture Register
#define REG_CONTROL 0x00
#define REG_STATUS 0x01
#define REG_BASE_ADDRESS 0x02
#define REG_PIXEL_CNT 0x03
//读一个寄存器
Status32 = h2p_vip_capture_addr[REG_STATUS];
//写一个寄存器
h2p_vip_capture_addr[REG_BASE_ADDRESS] = FRAME_BASE;
[/code]
|