Gitiles
Code Review
Sign In
gerrit.openbmc.org
/
openbmc
/
skeleton
/
51e0b89808b44838722f5572375f7e546897a41b
/
.
/
pysystemmgr
/
obmc
/
system
/
__init__.py
blob: 8799b695f75df401eb9cab50e18ffffd2e9b3384 [
file
] [
log
] [
blame
]
Brad Bishop
a7ac805
2016-09-21 09:17:05 -0400
[
diff
] [
blame
]
1
GPIO_BASE
=
320
2
3
def
convertGpio
(
name
):
4
name
=
name
.
upper
()
5
c
=
name
[
0
:
1
]
6
offset
=
int
(
name
[
1
:])
7
a
=
ord
(
c
)-
65
8
base
=
a
*
8
+
GPIO_BASE
9
return
base
+
offset