Unable to get RTC date/time from camera device from NXP iMX6 family board

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Unable to get RTC date/time from camera device from NXP iMX6 family board

906 次查看
rajibgohain
Contributor I

Family: IMX6 

Description: We are trying to read hardware device time (camera device ) from the iMX6 board using open ioctl call. However, we are getting an error and negative value is returned from ioctl API. Please suggest what could be the issue or how to get the exact error code/detailed description?
This issue is occurring at the Production domain.
The rtc0 file has a soft link as shown in the attached file.
Please find the snippet of the code below:
int fd, retval;
fd = open("/dev/rtc0", O_RDWR);
if(fd < 0)
{
printf("unable to open");
}
/* Read the RTC time/date */
retval = ioctl(fd, RTC_RD_TIME, &rt);
if (retval == -1) {
printf("RTC_RD_TIME ioctl error");
}
close(fd);

0 项奖励
回复
0 回复数