adafruit / Adafruit_BusIO

Arduino library for I2C & SPI abstractions
MIT License
285 stars 259 forks source link

If there are no global instances defined, don't provide default &Seri… #112

Open fionn-r opened 1 year ago

fionn-r commented 1 year ago

This is a fix to issue #111 where if HardwareSerial Serial is not defined, Adafruit_BusIO_Register.h will not be able to find Serial and cause compilation to fail.

The change only affects the scope where either NO_GLOBAL_INSTANCES or NO_GLOBAL_SERIAL is defined, which is the case where it was failing to compile anyway. In all other cases, the change has no impact. If a dependent is requiring the default argument, then the dependent will not compile anyway if there is no global serial.

fionn-r commented 1 year ago

That error looks like there's more an issue with how the doxygen docs generation is done rather than the change....

Is there an easy fix to this? I can add docs to the .h file but that goes against the documentation at definition rather than declaration. I can also add a doxygen \cond wrapper around in the header?

ladyada commented 1 year ago

yah you can add \cond or otherwise make doxygen tweaks but we do require doxygen passes to merge :)