duinoWitchery / hd44780

Extensible hd44780 LCD library
GNU General Public License v3.0
234 stars 56 forks source link

Missing "Wire.h" include #17

Closed bohdanyurov-gl closed 4 years ago

bohdanyurov-gl commented 4 years ago

Looks like hd44780_I2Cexp.h is missing Wire.h include.

bperrybap commented 4 years ago

It is not missing. It is intentionally not included because a user may need or want to include a different named header file for "Wire" support. For example if a user wants to use a software wire implementation, they could do that by using:

#include <SoftwareWire.h>

in their sketch rather than You can see this in the hd44780_I2C i/o class example SoftwareWire If hd44780_I2Cexp.h was including the Wire.h header file it would preclude use cases like this.

bohdanyurov-gl commented 4 years ago

Makes sense. That is fine for Arduino sketches, but not for PlatformIO, though. Thanks for the answer, anyway.

bohdanyurov-gl commented 4 years ago

Nevermind, it still works when specifying dependencies correctly. Stupid me.