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

Add ieee802_3_miim crate for MIIM support, and allow MAC to borrow or own Mii #45

Merged
merged 16 commits into from
Aug 6, 2022

Conversation

datdenkikniet
Copy link
Contributor

@datdenkikniet datdenkikniet commented Jun 13, 2022

Instead of "forcing" users to implement their own PHYs based on Smi, and keeping track of Mdio/Mdc pins manually, this API allows one to choose between the different ways of obtaining control over the MAC's SMI.

I've removed the smi feature because it makes little sense to me to have one to begin with, as most users will always want to interact with SMI, and if not they can continue using new to avoid it.

We start using the ieee802_3_miim crate (authored by me) for Miim (previously: StationManagement) and PHY configuration support.

Additionally, this PR splits up the code for the MAC and DMA into seperate modules for easier oversight.

@datdenkikniet datdenkikniet force-pushed the more_smi branch 3 times, most recently from 273b56d to 62db215 Compare June 13, 2022 09:45
@datdenkikniet datdenkikniet changed the title Re-add StationManagement trait, and allow MAC to ignore, borrow, or own SMI Re-add StationManagement trait, and allow MAC to borrow or own SMI Jun 13, 2022
@datdenkikniet datdenkikniet force-pushed the more_smi branch 5 times, most recently from 8c7e37d to 85be644 Compare June 13, 2022 12:19
@datdenkikniet datdenkikniet force-pushed the more_smi branch 2 times, most recently from 2244066 to 3929610 Compare July 15, 2022 13:41
@datdenkikniet datdenkikniet changed the title Re-add StationManagement trait, and allow MAC to borrow or own SMI Add ieee802_3_miim crate for MIIM support, and allow MAC to borrow or own SMI Aug 3, 2022
Johannes Draaijer and others added 10 commits August 3, 2022 17:11
Re-add StationManagement trait

Implement StationManagement for `Smi` and `EthernetMAC<OwnedSmi>`

Add basic driver for `LAN87XXA` based phys, based on `StationManagement` trait
Add some docs and make LAN87XXA phy implmementation a bit more clear
Make `mac` a bit more encapsulated to avoid polluting `lib` scope
Remove type state and just have another type for owned SMI
@datdenkikniet datdenkikniet force-pushed the more_smi branch 2 times, most recently from 4dc3dac to 34b8581 Compare August 5, 2022 13:53
…cess to the

entirety of the MAC peripheral for the duration of SMI accesses
@datdenkikniet datdenkikniet changed the title Add ieee802_3_miim crate for MIIM support, and allow MAC to borrow or own SMI Add ieee802_3_miim crate for MIIM support, and allow MAC to borrow or own Mii Aug 5, 2022
Copy link
Contributor

@korken89 korken89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@korken89 korken89 merged commit abc1a7f into stm32-rs:master Aug 6, 2022
@korken89 korken89 deleted the more_smi branch August 6, 2022 11:07
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

Successfully merging this pull request may close these issues.

2 participants