diff --git a/Cargo.toml b/Cargo.toml index 515f61f..8596cd2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ repository = "https://github.com/rust-osdev/uart_16550" edition = "2018" [dependencies] -bitflags = "1.1.0" +bitflags = "2" rustversion = "1.0.5" [target.'cfg(any(target_arch = "x86", target_arch = "x86_64"))'.dependencies] diff --git a/Changelog.md b/Changelog.md index 2080f59..327bc63 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,7 @@ # Unreleased +- Update bitflags dependency to version 2 ([#33](https://github.com/rust-osdev/uart_16550/pull/33)) + # 0.3.0 – 2023-08-04 - Internal rewrite of port operations to work on both `x86` and `x86_64` ([#29](https://github.com/rust-osdev/uart_16550/pull/29)) diff --git a/src/lib.rs b/src/lib.rs index 8be7cd2..4f65f2f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -84,6 +84,8 @@ pub use crate::port::SerialPort; bitflags! { /// Interrupt enable flags + #[repr(transparent)] + #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] struct IntEnFlags: u8 { const RECEIVED = 1; const SENT = 1 << 1; @@ -95,6 +97,8 @@ bitflags! { bitflags! { /// Line status flags + #[repr(transparent)] + #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] struct LineStsFlags: u8 { const INPUT_FULL = 1; // 1 to 4 unknown