Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

JF002
Copy link
Contributor

@JF002 JF002 commented Oct 23, 2022

This PR implements the new hardware abstraction from InfiniTimeOrg/InfiniTime#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.

sim/port/infinitime.h Outdated Show resolved Hide resolved
sim/drivers/infinisim/SpiNorFlash.cpp Outdated Show resolved Hide resolved
sim/drivers/infinisim/Spi.h Outdated Show resolved Hide resolved
sim/drivers/infinisim/Spi.cpp Outdated Show resolved Hide resolved
@NeroBurner NeroBurner added the needs-InfiniTime-change PR blocked until InfiniTime upstream change is merged label Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-InfiniTime-change PR blocked until InfiniTime upstream change is merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants