|
求解DSP端通过EMIF口读FPGA端数据的一个小函数
[复制链接]
#define ADDR_NORMAL_DATA *(volatile Uint32 *)0xA0200014
函数传给形参addr的为RD_ADDR_KEY_0,其宏定义如下:
#define RD_ADDR_KEY_0 1
int RDNormal(unsigned int addr){
unsigned int data;
ADDR_NORMAL_DATA = 0x7FFF & (((addr & 0x7F) << 8) + (0 & 0xFF));
data = ADDR_NORMAL_DATA;
data = data & 0xFF;
return data;
}
|
|