Skip to content

extmod/network_wiznet5k: allow SPI object to be more generic #9034

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

Merged

Conversation

dpgeorge
Copy link
Member

@dpgeorge dpgeorge commented Aug 9, 2022

This allows the SPI object used to communicate with the WIZNET5K hardware to be SoftSPI or hardware SPI, or anything that has the SPI protocol (at the C level).

To facilitate #9021.

@dpgeorge dpgeorge added the extmod Relates to extmod/ directory in source label Aug 9, 2022
Instead of using the fixed machine_spi_type entity to get the SPI transfer
function, this transfer function is now extracted dynamically from the type
of the SPI object.

This allows the SPI object used to communicate with the WIZNET5K hardware
to be SoftSPI or hardware SPI, or anything that has the SPI protocol (at
the C level).

Signed-off-by: Damien George <damien@micropython.org>
And remove the now-obsolete spi_from_mp_obj() function.

Signed-off-by: Damien George <damien@micropython.org>
@dpgeorge dpgeorge force-pushed the extmod-network-wiznet5k-generic-spi branch from 27dc690 to f72d3ce Compare August 10, 2022 04:06
@dpgeorge dpgeorge merged commit f72d3ce into micropython:master Aug 10, 2022
@dpgeorge dpgeorge deleted the extmod-network-wiznet5k-generic-spi branch August 10, 2022 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extmod Relates to extmod/ directory in source
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant