When a new interface is created with PGPIO8BitInterface::new() the function assumes that all the pins are set to low beforehand. If that's not the case, the driver will start in an unexpected state because last is set to 0.
We should either drive the entire bus low on new(), or at least add this to the documentation. I would personally incline towards driving the pins low on initialization to ensure that the driver will work correctly even if the user fails to read one sentence in the documentation.
When a new interface is created with
PGPIO8BitInterface::new()
the function assumes that all the pins are set to low beforehand. If that's not the case, the driver will start in an unexpected state becauselast
is set to 0.We should either drive the entire bus low on
new()
, or at least add this to the documentation. I would personally incline towards driving the pins low on initialization to ensure that the driver will work correctly even if the user fails to read one sentence in the documentation.