InfiniSim icon indicating copy to clipboard operation
InfiniSim copied to clipboard

Implement new hardware abstraction from InfiniTime using C++20 concepts.

Open JF002 opened this issue 3 years ago • 0 comments

This PR implements the new hardware abstraction from https://github.com/InfiniTimeOrg/InfiniTime/pull/1387.

Notice that the C++ standard was upgraded from 17 to 20.

InfiniTime now defines an "interface" for the drivers (only Spi, SpiMaster and SpiNorFlash are modified right now). The application (InfiniTime / InfiniSim) must inject an actual implementation for the driver. This allows InfiniSim to inject its own implementation into the interface, instead of having to provide an alternative version of the same class (same name, same namespace, same constructor). This will probably allow to remove a lot of redefinitions and copy/paste InfiniSim had to make to implement the current drivers.

JF002 avatar Oct 23 '22 17:10 JF002