felias-fogg / SoftI2CMaster

Software I2C Arduino library
GNU General Public License v3.0
368 stars 100 forks source link

Using in multiple files #65

Closed ArminJo closed 2 years ago

ArminJo commented 2 years ago

Hello Bernhard, I use you library extensively, eg in https://github.com/ArminJo/OpenledRace. Now I want to add an I2C LCD and have a problem with adopting LiquidCrystal_I2C to your library. I have it to modify at a few places, this is easy, but I need a SoftI2CMaster.h with only the interface / declarations for compiling the modified LiquidCrystal_I2C.cpp file.

I had the problem with all my libraries (e.g. https://github.com/Arduino-IRremote/Arduino-IRremote/tree/master/src) and I found, that is is common practise to have the code in an .hpp file and the interface in an .h file.

Since this library is quite fresh and must not be heavily backwards compatible, I would suggest to rename SoftI2CMaster.h to SoftI2CMaster.hpp and create a new SoftI2CMaster.h file. The version could be bumped to 2.2.0 or even 3.0.0 As always I can deliver a PR for this...

Best regards Armin

Btw. Consider to enable GitHub discussions in Settings/

felias-fogg commented 2 years ago

Done!