adafruit / Adafruit_SH110x

Arduino library for SH110x based monochrome OLEDs
Other
67 stars 30 forks source link

Fix null i2c_dev access for SPI case #11

Closed caternuson closed 2 years ago

caternuson commented 2 years ago

For #10. Untested, but seems like an obvious issue and simple fix. maxbuff is only used locally inside the if (i2c_dev) { block, so just move it there. Otherwise an attempt will be made to access i2c_dev for SPI configurations.