Gitiles
Code Review
Sign In
gerrit.openbmc.org
/
openbmc
/
skeleton
/
f35a7ddf30c27b796b969acc9f125b82e2de89bf
/
.
/
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