Alternate method for performing DETECT_DEVICE

This method is compatible with Wire and TinyWireM, so it will work with ATTiny controllers.

This patch also includes support for inverted backlight displays.