A-4
GPIO WDT BKL Programming
MS-98H7
General Purposed IO
1. General
Purposed
IO
–
GPIO/DIO
The
associated
access
method
(
EC_ReadByte
,
EC_WriteByte
)
are
provided
in
part
5.
The
GPIO
port
configuration
offset
in
EC
and
addresses
are
listed
in
the
following
table:
Name
OFFSET
IO
address
Name
OFFSET
IO
address
N_GPI0
0x97
Bit
0
N_GPO0
0x97
Bit
4
N_GPI1
0x97
Bit
1
N_GPO1
0x97
Bit
5
N_GPI2
0x97
Bit
2
N_GPO2
0x97
Bit
6
N_GPI3
0x97
Bit
3
N_GPO3
0x97
Bit
7
1.1
Set
output
value
of
GPO
1. Read
the
value
from
the
OFFSET
in
EC
RAM
of
GPO.
2. Set
the
value
of
GPO
address.
3. Write
the
value
back
to
the
OFFSET
in
EC
RAM
of
GPO.
Example:
Set
N_GPO0
output
“high”
val
=
EC_ReadByte
(
0x97
);
//
Read
value
from
N_GPO0
.
val
=
val
|
(1<<
4
);
//
Set
N_GPO0
address
(bit
4)
to
1
(output
“high”).
EC_WriteByte
(
0x97
,
val);
//
Write
back
to
N_GPO0
.
Example:
Set
N_GPO1
output
“low”
val
=
EC_ReadByte
(
0x97
);
//
Read
value
from
N_GPO1
.
val
=
val
&
(~(1<<
5
));
//
Set
N_GPO1
address
(bit
5)
to
0
(output
“low”).
EC_WriteByte
(
0x97
,
val);
//
Write
back
to
N_GPO1
.
1.2
Read
input
value
from
GPI
1. Read
the
value
from
the
OFFSET
in
EC
of
GPI.
2. Get
the
value
of
GPI
address.
Example:
Get
N_GPI2
input
value.
val
=
EC_ReadByte
(
0x97
);
//
Read
value
from
N_GPI2
.
val
=
val
&
(1<<
2
);
//
Check
N_GPI2
address
(bit
2).
if
(val)
printf
(“Input
of
N_GPI2
is
High”);
else
printf
(“Input
of
N_GPI2
is
Low”);
Summary of Contents for MS-98H7
Page 1: ...i MS 98H7 COM Express Type 6 Basic Module...
Page 10: ...1 4 Overview Layout CPU FAN DDR4 SO DIMMs...
Page 11: ...1 5 MS 98H7 Block Diagram...
Page 12: ......
Page 22: ......
Page 46: ......