Rtc function, Debugging function, 9 rtc function – Solvline Eddy DKV2.1.0.3 User Manual

Page 99: 10 debugging function

Advertising
background image

Chapter 6. Library

Introduction

99

Returns

None

Notice

Struct adc_value {
int ch1_value;
int ch2_value;
int ch3_value;
int ch4_value;
};

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

6.10 Debugging Function

Eddy can debug operating condition of each application via Telnet in real time.
The following functions are used to print debug log message to Telnet window when SB_DEBUG of

Advertising