projects
/
soc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a8bdba
)
adapt botchify so it can be used for 31- or 15- etc. etc.
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Tue, 16 Feb 2021 16:33:22 +0000
(16:33 +0000)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Tue, 16 Feb 2021 16:35:33 +0000
(16:35 +0000)
src/soc/consts.py
patch
|
blob
|
history
diff --git
a/src/soc/consts.py
b/src/soc/consts.py
index 25ce875883082f697776e52fade4b4989fa75dcd..0482125b1add8ae6e6d729b25a60156446595fe9 100644
(file)
--- a/
src/soc/consts.py
+++ b/
src/soc/consts.py
@@
-1,9
+1,9
@@
# sigh create little-ended versions of bitfield flags
-def botchify(bekls, lekls):
+def botchify(bekls, lekls
, msb=63
):
for attr in dir(bekls):
if attr[0] == '_':
continue
- setattr(lekls, attr,
63
-getattr(bekls, attr))
+ setattr(lekls, attr,
msb
-getattr(bekls, attr))
# Can't think of a better place to put these functions.