mirror of
https://github.com/AsahiLinux/m1n1
synced 2025-02-16 13:48:29 +00:00
experiments/agx_dumpstructs.py: Dump microsequence
Signed-off-by: Asahi Lina <lina@asahilina.net>
This commit is contained in:
parent
88603e153c
commit
d1a3b8c7fa
1 changed files with 10 additions and 6 deletions
|
@ -5,11 +5,15 @@ import sys, pathlib, time
|
|||
sys.path.append(str(pathlib.Path(__file__).resolve().parents[1]))
|
||||
|
||||
from m1n1.constructutils import *
|
||||
from m1n1.fw.agx import initdata
|
||||
from m1n1.fw.agx import microsequence, initdata
|
||||
|
||||
#for v in initdata.__all__:
|
||||
for v in initdata.__dict__:
|
||||
struct = getattr(initdata, v)
|
||||
if isinstance(struct, type) and issubclass(struct, ConstructClass) and struct is not ConstructClass:
|
||||
print(struct.to_rust())
|
||||
print()
|
||||
#for v in initdata.__dict__:
|
||||
def dump(module):
|
||||
for v in module.__dict__:
|
||||
struct = getattr(module, v)
|
||||
if isinstance(struct, type) and issubclass(struct, ConstructClass) and struct is not ConstructClass:
|
||||
print(struct.to_rust())
|
||||
print()
|
||||
|
||||
dump(microsequence)
|
||||
|
|
Loading…
Add table
Reference in a new issue