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

Refactor to better separate HW and SW SPI #81

Closed
caternuson opened this issue Jan 26, 2022 · 1 comment
Closed

Refactor to better separate HW and SW SPI #81

caternuson opened this issue Jan 26, 2022 · 1 comment

Comments

@caternuson
Copy link
Contributor

Current code has a preproc check that will skip all of the code for boards that do not have a hardware SPI capability:

#if !defined(SPI_INTERFACES_COUNT) || \
(defined(SPI_INTERFACES_COUNT) && (SPI_INTERFACES_COUNT > 0))

This prevents using even BusIO's software SPI capability in those cases.

Further, there are numerous code segments in the nominal software parts that are relying on being able to import SPI.h. For example, the software constructor is using SPISettings:

_spiSetting = new SPISettings(freq, dataOrder, dataMode);

as well as SPIMode defs.

To better support software SPI only boards, would help to do a general refactor to better separate the HW/SW code.

@caternuson
Copy link
Contributor Author

Closing. Should be fixed by #108.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant