Hi,
I am working on beagle board, i am accessing memory(0x49056034) from user space
int fd = open("/dev/mem", O_RDWR);
if (fd < 0)
{
printf(“Could not open file\n”);
return;
}
eink_conregp = (volatile EINK_CONREG *) mmap(NULL, 0x10000, PROT_READ | PROT_WRITE,
MAP_PRIVATE,fd, 0x49056000);
if (eink_conregp == MAP_FAILED)
{
printf(“Mapping failed\n”);
close(fd);
return;
}
printf(“Address of eink_conreg %x\n”,eink_conreg);
i am getting the address for 0x49056000
eink_conregp = eink_conregp + 0x34;
printf(“Address of eink_conreg %x\n”,eink_conreg);
I am not able to add this 0x34, i am getting some 0xe0
Please let me know what i am doing is wrong? I want access 0x49056034 memory location of beagle board.