An attempt to automatically detect OS and choose the right adaptations as implemented in a subclass called SMBusFreeBSD.
Design criteria:
FreeBSD adaptations and adjustments should be fully separate from the Linux implementation. It is quite different, and the Linux implementation must not be full of ifs everywhere.
It should be possible to use with SMBus(<busno>) as bus: as before without thinking about OS. This is the preferred usage pattern and just has to work.
Current concerns:
It's not 100% backwards compatible... :/
Penalty checking architecture every time a new bus class is instantiated.
An attempt to automatically detect OS and choose the right adaptations as implemented in a subclass called
SMBusFreeBSD
.Design criteria:
if
s everywhere.with SMBus(<busno>) as bus:
as before without thinking about OS. This is the preferred usage pattern and just has to work.Current concerns: