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

feat(mmio): add new_with_stride #36

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

kouchekiniad
Copy link
Contributor

This change adds new_with_stride to MmioSerialPort, allowing access to MMIO UART controllers with multi-byte register strides.

@kouchekiniad
Copy link
Contributor Author

Hi @phil-opp, I'd appreciate if you could take a look at this PR. Some 16550 controllers use inter-register strides greater than 1, typically either 2 or 4 bytes. As a reference for this behavior, the Linux kernel's console parameter takes options for MMIO register strides of 1 bytes, 2 bytes, and 4 bytes. Adding support for variable register strides, as this PR does, adds support for several UART controllers not currently supported by this crate.

Copy link
Member

@phil-opp phil-opp 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, thanks!

@phil-opp phil-opp enabled auto-merge November 13, 2024 13:56
@phil-opp phil-opp merged commit 67f5437 into rust-osdev:master Nov 13, 2024
4 checks passed
phil-opp added a commit that referenced this pull request Nov 13, 2024
@phil-opp
Copy link
Member

Published as v0.3.2

@kouchekiniad
Copy link
Contributor Author

Thank you!

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