Copyright © 2019 NEXCOM International Co., Ltd. All Rights Reserved.
59
NISE 505 User Manual
Appendix B: EC Command Documentation
4.5 Read GPIO Direction Sequence
Step
Action
Description
RW Sample Code
Command
0
Wait IBF clear
x
1
Write 0x10 to 0x66
Send GPIO index
command
>o 0x66 0x10
2
Wait IBF clear
x
3
Write pin number to
0x62
Write pin number to
index
>o 0x62 0x07(GPIO7)
4
Wait OBF set
x
5
Read 0x62 port
If index setup is
successful, EC will
return pin number.
If failed, EC will return
0xFF.
>i 0x62
6
Wait IBF clear
x
7
Write 0x1D to 0x66
Send read GPIO status
command
>o 0x66 0x1D
8
Wait OBF set
x
9
Read 0x62 port
EC will return pin
status according to the
pin number which you
set in index.
0x80-input, 0x40-
output. 0xFF-fail
>i 0x62
4.6 Write GPIO Direction Sequence
Step
Action
Description
RW Sample Code
Command
0
Wait IBF clear
x
1
Write 0x10 to 0x66
Send GPIO index
command
>o 0x66 0x10
2
Wait IBF clear
x
3
Write pin number to
0x62
Write pin number to
index
>o 0x62 0x07(GPIO7)
4
Wait OBF set
x
5
Read 0x62 port
If index setup is
successful, EC will
return pin number.
If failed, EC will return
0xFF.
>i 0x62
6
Wait IBF clear
x
7
Write 0x1E to 0x66
Send write GPIO status
command
>o 0x66 0x1E
8
Wait OBF clear
x
9
Write pin status to
0x62 port
Write 0x40, GPIO pin
will be set output.
Write 0x80, GPIO pin
will be set input.
>o 0x62 0x40(output)