Skip to content

Commit 85dde1c

Browse files
authored
Merge pull request #28 from phip1611/x86
serial also on arch x86
2 parents d401ea1 + 0c2d141 commit 85dde1c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
//!
1919
//!
2020
//! ```no_run
21-
//! # #[cfg(target_arch = "x86_64")]
21+
//! # #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
2222
//! # fn main() {
2323
//! use uart_16550::SerialPort;
2424
//!
@@ -33,7 +33,7 @@
3333
//! // To receive a byte:
3434
//! let data = serial_port.receive();
3535
//! # }
36-
//! # #[cfg(not(target_arch = "x86_64"))]
36+
//! # #[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))]
3737
//! # fn main() {}
3838
//! ```
3939
//!
@@ -74,12 +74,12 @@ macro_rules! wait_for {
7474

7575
/// Memory mapped implementation
7676
mod mmio;
77-
#[cfg(target_arch = "x86_64")]
77+
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
7878
/// Port asm commands implementation
7979
mod port;
8080

8181
pub use crate::mmio::MmioSerialPort;
82-
#[cfg(target_arch = "x86_64")]
82+
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
8383
pub use crate::port::SerialPort;
8484

8585
bitflags! {

src/port.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use x86_64::instructions::port::{Port, PortReadOnly, PortWriteOnly};
55
use crate::LineStsFlags;
66

77
/// A port-mapped UART.
8-
#[cfg_attr(docsrs, doc(cfg(target_arch = "x86_64")))]
8+
#[cfg_attr(docsrs, doc(cfg(any(target_arch = "x86", target_arch = "x86_64"))))]
99
pub struct SerialPort {
1010
data: Port<u8>,
1111
int_en: PortWriteOnly<u8>,

0 commit comments

Comments
 (0)