JohnDoneth / hd44780-driver

Implementation of the embedded-hal traits for the HD44780.
MIT License
37 stars 40 forks source link

Add tests #31

Open JohnDoneth opened 3 years ago

JohnDoneth commented 3 years ago

Since most of the functionality abstracts over the bus by use of the DataBus trait we should be able to provide a mock struct that implements DataBus and can assert that the correct commands are being written.

su-sd commented 2 weeks ago

An enum could be used, where each variant contains a different bus type. Than users of the API could pass the HD44780 around without the need to specify on every function that B is a DataBus.