Very similarly to https://github.com/jamwaffles/sh1106/pull/8, I added an error enum with two types: a communication error type and a pin error type which allows users to handle I2C or SPI communication errors as well as SPI pin setting errors.
I had to make reset fallible, though. User code will then get an unused Result warning.
No other changes are required in user code if the results were simply unwrapped.
Very similarly to https://github.com/jamwaffles/sh1106/pull/8, I added an error
enum
with two types: a communication error type and a pin error type which allows users to handle I2C or SPI communication errors as well as SPI pin setting errors. I had to makereset
fallible, though. User code will then get an unused Result warning. No other changes are required in user code if the results were simply unwrapped.