117
RTC Timer (Apollolake) - User Guide
Appendix
IND100077-195
DOC207017- rev 01 – 2018-09-24 - Created by: 6644
Page 9 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
typedef
short
(
__stdcall
*lpInp32)(
short
);
lpOut32 gfpOut32;
lpInp32 gfpInp32;
//Base Address Read
unsigned
char
SlaveDeviceReadByte(
unsigned
char
bSlaveDeviceAddr
,
unsigned
char
bSlaveRegisterAddr
)
{
unsigned
char
bValue = 0;
//1. Clear host status
gfpOut32(iBaseAdd bOffsetHostStatus, 0xFE);
//2. Wait for 2 sec
Sleep(1000);
//3. Read Host Status
bValue = (
unsigned
char
)gfpInp32(iBaseAdd bOffsetHostStatus);
Sleep(1000);
bValue = (
unsigned
char
)gfpInp32(iBaseAdd bOffsetHostStatus);
if
(bValue != 0x40)
{
//Error
}
//4. Set Device address
gfpOut32(iBaseAdd bOffsetSlaveDeviceAddress,
bSlaveDeviceAddr
);
//5. Set Slave register address
gfpOut32(iBaseAdd bOffsetSlaveRegisterAddress,
bSlaveRegisterAddr
);
//6. Set Execute bit
gfpOut32(iBaseAdd bOffsetExecute, 0x48);
//7. Wait 1 sec
Sleep(1000);
//8. Read Execute bit
bValue = (
unsigned
char
)gfpInp32(iBaseAdd bOffsetExecute);
if
(bValue != 0x08)
{
//Error
}
//9. Read returned data
bValue = (
unsigned
char
)gfpInp32(iBaseAdd bOffsetSlaveRegisterData);
return
bValue;
}
void
SlaveDeviceWriteByte(
unsigned
char
bSlaveDeviceAddr
,
unsigned
char
bSlaveRegisterAddr
,
unsigned
char
bSlaveRegisterData
)
{
Содержание 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...