Rtc (Real Time Clock) - Korenix JetBox 8100 User Manual

Embedded linux
Hide thumbs Also See for JetBox 8100:
Table of Contents

Advertisement

argument is an untyped pointer to memory. It's traditionally char *argp
(from the days before void * was valid C), and will be so named for this
discussion.
An ioctl() request has encoded in it whether the argument is an in
parameter or out parameter, and the size of the argument argp in bytes.
Macros and defines used in specifying an ioctl() request are located in the
file <sys/ioctl.h>.
RETURN VALUE
Usually, on success zero is returned. A few ioctl() requests use the return
value as an output parameter and return a nonnegative value on success.
On error, -1 is returned, and errno is set appropriately.
Use the desktop Linux's man page for detailed documentation:
#man ioctl

5.4 RTC (Real Time Clock)

The device node is located at /dev/rtc. Jetbox supports Linux standard
simple RTC control. You must include <linux/rtc.h>
.
1. Function: RTC_RD_TIME
int ioctl(fd, RTC_RD_TIME, struct rtc_time *time);
Description: read time information from RTC. It will return the value on
argument 3.
2. Function: RTC_SET_TIME
int ioctl(fd, RTC_SET_TIME, struct rtc_time *time);
Description: set RTC time. Argument 3 will be passed to RTC.
For more information, please see example/rtc/rtc.txt
JetBox 8100 User Manaual_Linux_1.1
33

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Jetbox 8100-lJetbox 8100-lm

Table of Contents