File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class InitBlock(ConstructClass):
2525 Switch (this .type , {
2626 0 : HIDDescriptor ,
2727 1 : GPIOInit ,
28- 2 : GreedyBytes , # Unknown 6 bytes
28+ 2 : GreedyBytes , # Unknown 6 bytes terminator
2929 7 : GreedyBytes , # Device name
3030 }, default = GreedyBytes ))
3131 )
@@ -255,7 +255,6 @@ def report(self, msg):
255255 self .log (f"Got HID descriptor for { iface } :" )
256256 iface .descriptor = blk .payload .descriptor
257257 self .log (hexdump (iface .descriptor ))
258- iface .initialize ()
259258 elif isinstance (blk .payload , GPIOInit ):
260259 self .log (f"GPIO Init: { blk .payload } " )
261260 prop = getattr (self .proto .node [msg .device_name ],
@@ -264,6 +263,8 @@ def report(self, msg):
264263 val = prop .args [1 ]
265264 self .log (f"GPIO key: { key } " )
266265 self .gpios [(msg .device_id , blk .payload .gpio_id )] = key , val
266+ if not msg .more_packets :
267+ iface .initialize ()
267268 elif isinstance (msg , GPIORequestMsg ):
268269 self .log (f"GPIO request: { msg } " )
269270 smcep = self .proto .smc .epmap [0x20 ]
You can’t perform that action at this time.
0 commit comments