diff --git a/electronics_abstract_parts/IoControllerInterfaceMixins.py b/electronics_abstract_parts/IoControllerInterfaceMixins.py index a916e010e..7812fe569 100644 --- a/electronics_abstract_parts/IoControllerInterfaceMixins.py +++ b/electronics_abstract_parts/IoControllerInterfaceMixins.py @@ -23,7 +23,7 @@ def __init__(self, *args, **kwargs) -> None: super().__init__(*args, **kwargs) self.usb = self.Port(Vector(UsbDevicePort.empty()), optional=True) - self.implementation(lambda base: base._io_ports.append(self.usb)) + self.implementation(lambda base: base._io_ports.insert(0, self.usb)) class IoControllerI2s(BlockInterfaceMixin[BaseIoController]): diff --git a/electronics_lib/SwitchMatrix.py b/electronics_lib/SwitchMatrix.py index 80d1c32c8..afd60cba4 100644 --- a/electronics_lib/SwitchMatrix.py +++ b/electronics_lib/SwitchMatrix.py @@ -21,7 +21,7 @@ def __init__(self, nrows: IntLike, ncols: IntLike, voltage_drop: RangeLike = (0, self.voltage_drop = self.ArgParameter(voltage_drop) self.nrows = self.ArgParameter(nrows) - self.ncols = self.ArgParameter(nrows) + self.ncols = self.ArgParameter(ncols) self.generator_param(self.nrows, self.ncols) def generate(self):