match mux and chain ordering
authorDan White <dan@whiteaudio.com>
Sun, 17 Jun 2012 02:40:55 +0000 (21:40 -0500)
committerDan White <dan@whiteaudio.com>
Sun, 17 Jun 2012 02:40:55 +0000 (21:40 -0500)
python-lib/usbio.py

index f83149f7bc695b516d0fe91f735892922fb89193..4c3b83f968ab4b736ced1c8ba3e88ab528b33148 100644 (file)
@@ -511,8 +511,8 @@ class Chain(object):
     def bytes(self):
         """Return the control data as a byte sequence in MSB..LSB order."""
         data = []
-        # TODO: check ordering WRT Chain0Ctl mux
-        for h in self.h:
+        # reversed() matches indexing to mux selection
+        for h in reversed(self.h):
             data.extend(h.bytes)
         return tuple(data)