Gitiles
Code Review
Sign In
gerrit.openbmc.org
/
openbmc
/
skeleton
/
45cb4fcc1842ed6f7dc6ada791f8a8fdaec98e3c
/
.
/
pysystemmgr
/
obmc
/
system
/
__init__.py
blob: 9a2a50a29645fba4785a6d91138b31375710a27b [
file
] [
log
] [
blame
]
GPIO_BASE
=
320
def
convertGpio
(
name
):
offset
=
int
(
filter
(
str
.
isdigit
,
name
))
port
=
filter
(
str
.
isalpha
,
name
.
upper
())
a
=
ord
(
port
[-
1
])
-
ord
(
'A'
)
if
len
(
port
)
>
1
:
a
+=
26
base
=
a
*
8
+
GPIO_BASE
return
base
+
offset