Eddy DK Programmer Guide
119
6.9
RTC Function
Eddy CPU provides separate RTC(Real Time Clock) in DK.
Date and time can be configured through program or with Date and rdate provided by Busybox.
Sample program “Eddy_Apps/test_rtc.c” uses RTC device so users can refer to this source for developing
programs.
RTC_SET_TIME
Function
Configures date and time in RTC device
Format
void ioctl(int fd, RTC_SET_TIME, struct tm *tm);
Parameter
fd
Handle to RTC device(“/dev/rtc0”)
tm
Pointer to struct that stores date and time to be
configured. Compatible with struct tm for Linux
standard time interface.
Returns
None
Notice
RTC_RD_TIME
Function
Reads date and time from RTC device
Format
void ioctl(int fd, RTC_RD_TIME, struct tm *tm);
Parameter
fd
Handle to RTC device(“/dev/rtc0”)
tm
Pointer to struct that will store date and time read.
Compatible with struct tm for Linux standard time
interface.
Returns
None
Notice
Содержание Eddy DK
Страница 1: ...1 Eddy DK Programmer Guide Ver 2 5 1 1 2011 02 15...
Страница 10: ...Eddy DK Programmer Guide 10 2 3 Eddy CPU v2 1 v2 5...
Страница 36: ...Eddy DK Programmer Guide 36 2 4 4 External Device Interface Description...
Страница 47: ...Eddy DK Programmer Guide 47 Eddy S4M v2 1 Eddy S4M v2 5...