Open CrazyGecko opened 3 years ago
Currently, there is an abstract PIN
class Max14819::PIN
from which HardwareRaspberry::PIN_raspi
and HardwareArduino::PIN_arduino
inherit. Only one of them gets compiled, because thery're part of the abstraction of different target hardware. The decision which one to compile is (or at least should be) bound to the selection of the target hardware platform at the beginning of the compilation.
Because of this, it's not appropriate to use polymorphism here.
Ideas to implement the above mentioned (where not already done) are to use one of the following:
#ifdef
etc.)using
directive to use the correct one for compilation.This has to be discussed further.
Actually there is a PIN object generated for every PIN. With some rework on the code, there is no need for the PIN object and the required function can be placed inline at compile time. This should reduce a big ammount of resource consumption and also reduces the execution time.