119
RTC Timer (Apollolake) - User Guide
Appendix
IND100077-195
DOC207017- rev 01 – 2018-09-24 - Created by: 6644
Page 11 of 12
Hatteland Display AS, Stokkastrandvegen 87B, N-5578 Nedre Vats, Norway
Tel: (+47) 4814 2200 - [email protected] - www.hatteland-display.com
User Guide RTC Timer - ApolloLake
All intellectual properties belongs to Hatteland Display AS
bRTCFormatValue = 1 <<
bTimeValue
;
}
}
return
bRTCFormatValue;
}
void Main(void)
{
…
//Write to RTC timer
cout <<
"Writing Year to RTC..."
;
SlaveDeviceWriteByte(bRTCSlaveAddressWrite, bRTCRegisterYear,
bYear);
cout <<
"Done"
<< endl;
cout <<
"Writing Month to RTC..."
;
SlaveDeviceWriteByte(bRTCSlaveAddressWrite, bRTCRegisterMonth,
bMonth);
cout <<
"Done"
<< endl;
cout <<
"Writing Day to RTC..."
;
SlaveDeviceWriteByte(bRTCSlaveAddressWrite, bRTCRegisterDay,
bDay);
cout <<
"Done"
<< endl;
cout <<
"Writing Hour to RTC..."
;
SlaveDeviceWriteByte(bRTCSlaveAddressWrite, bRTCRegisterHours,
bHours);
cout <<
"Done"
<< endl;
cout <<
"Writing Minute to RTC..."
;
SlaveDeviceWriteByte(bRTCSlaveAddressWrite, bRTCRegisterMinutes,
bMinutes);
cout <<
"Done"
<< endl;
cout <<
"Writing Second to RTC..."
;
SlaveDeviceWriteByte(bRTCSlaveAddressWrite, bRTCRegisterSeconds,
bSeconds);
cout <<
"Done"
<< endl;
}
3.2
Linux
Under Linux, there are two methods to access RTC timer:
-
Direct IO Access
-
RTC Driver
3.2.1
Direct IO Access
Linux provides the generic IO port access method. The user application can call the IO Read/Write
functions from user space. The two commonly used function is inb and outb.
1.
Read input from Port address
unsigned char
inb
(unsigned short int
port
);
2.
Set Output in Port Address
void
outb
(unsigned char
value
, unsigned short int
port
);
Before the IO port address can be accessed in user space. The application should use another
function
ioperm
to ask for the permission of usage.
Содержание Hatteland E Series
Страница 8: ...8 This page left intentionally blank...
Страница 9: ...9 General...
Страница 17: ...17 Installation...
Страница 41: ...41 Operation...
Страница 44: ...44 This page left intentionally blank...
Страница 45: ...45 Specifications...
Страница 61: ...61 Specifications Accessories...
Страница 65: ...65 Technical Drawings...
Страница 70: ...70 This page left intentionally blank...
Страница 71: ...71 Technical Drawings Accessories...
Страница 88: ...88 This page left intentionally blank...
Страница 89: ...89 Appendixes...
Страница 134: ...134 Appendix IND100077 24 User Notes...
Страница 136: ...Hatteland Technology AS www hattelandtechnology com Enterprise no NO974533146...