-
Notifications
You must be signed in to change notification settings - Fork 25
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 support for memory mapped UARTs #15
Conversation
Thanks for the PR! I don't think that reusing the same Regarding the features, I would prefer to keep the current |
I don't see other way to solve this problem besides these variants.
[features]
default = [ "port", "nightly" ]
port = []
stable = [ "x86_64/external_asm" ]
nightly = [ "x86_64/inline_asm" ]
mmio_stable = []
mmio_nightly = []
[features]
default = [ "port_nightly" ]
port_stable = [ "x86_64/external_asm" ]
port_nightly = [ "x86_64/inline_asm" ]
mmio_stable = []
mmio_nightly = []
[features]
default = [ "port_nightly" ]
port_stable = [ "x86_64/external_asm" ]
port_nightly = [ "x86_64/inline_asm" ]
mmio = []
[dependencies]
x86_64 = { version = "0.14.0", default-features = false, features = ["instructions", "x86_64/external_asm"], optional = true }
[features]
default = [ "port"]
port = ["x86_64"]
mmio = []
# Can combined with mmio
stable = [] # Noop for port feature
nightly = [] # Noop for port feature There's issue about target-specific features but it opened since 2015, so this can be perfect version but nowadays it impossible. [target.'cfg(target = "x86_64"'.features]
stable = ["x86_64/external_asm"]
nightly = ["x86_64/inline_asm"]
[target.'cfg(target = "riscv"'.features]
stable = []
nightly = [] |
This enables the `MmioSerialPort` type unconditionally on all architectures. The `SerialPort` type is only enabled on `x86_64`.
I think we can simplify this by enabling the |
Simplify cargo features by making `x86_64` a target-specific dependency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolve requested changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates and sorry for the delay! Looks good to me overall, I have a few suggestions for improvements, but I'll implement them in a follow-up PR.
Follow-up changes done in #18. Published as v0.2.15. |
Unresolved questions: