therealprof / display-interface

Rust crates providing a generic interface for display drivers and some default implementations (GPIO, SPI and I2C)
Apache License 2.0
73 stars 27 forks source link

Parallel GPIO 8-bit interface does not work if the data bus pins are not zero on init #18

Closed andresovela closed 3 years ago

andresovela commented 3 years ago

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.

therealprof commented 3 years ago

Makes sense, let's turn the pins into a defined state during initialisation.