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

905件の閲覧回数
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 返答(返信)