Professional Documents
Culture Documents
****************************************************************
1. Introducation
****************************************************************
ADSP21535 has one Real Time Clock RTC device, and the RTC driver
is designed as a standard Linux RTC driver.
****************************************************************
2. system call
****************************************************************
The RTC device driver is designed as a standard Linux RTC
driver, and the following system calls are supported.
The open function is used to establish the connection between the RTC
device with a file descriptor.
- oflag:
O_RDONLY Open for reading only
O_WRONLY Open for writing only
O_RDWR Open for reading and writing
USAGE:
------
int fd;
The close function is used to disconnect the RTC device with the relevant
file descriptor.
USAGE:
------
int fd;
1
The ioctl command is used to configure the RTC device.
USAGE:
------
int fd;
struct rtc_time rtc_tm;
int ret;
In the RTC driver, the read function is used to wait for the RTC device
interrupt.
When call the read function, the application is locked until a interrupt is
generated.
USAGE:
------
int fd;
int ret;
struct rtc_time rtc_tm;
unsigned long data;
****************************************************************
3. RTC deivce ioctl
****************************************************************
RTC_SWCNT_OFF: This ioctl does not need an argument, and it can
be used to disable the RTC stop-watch interrupt.
2
RTC_UIE_ON: This ioctl does not need an argument, and it can
be used to enable the RTC update interrupt.
****************************************************************
4. Caution
****************************************************************