diff options
author | Greg V <greg@unrelenting.technology> | 2015-10-15 19:57:35 +0300 |
---|---|---|
committer | Greg V <greg@unrelenting.technology> | 2015-10-15 20:02:52 +0300 |
commit | 318e79f0f4e148373f1bbb721fd06fa492fc8a7b (patch) | |
tree | c85d1e7eaa2427e8c660239a13e9351445c4dad6 | |
parent | b41c967ac171141ac5c1c459f92560d80930d1be (diff) | |
download | termios-rs-318e79f0f4e148373f1bbb721fd06fa492fc8a7b.zip |
Only reexport output options supported everywhere
-rw-r--r-- | src/lib.rs | 5 | ||||
-rwxr-xr-x | src/os/freebsd.rs | 5 |
2 files changed, 7 insertions, 3 deletions
@@ -91,7 +91,7 @@ //! //! #[cfg(target_os = "freebsd")] //! fn set_fastest_speed(termios: &mut Termios) -> io::Result<()> { -//! cfsetspeed(termios, termios::os::freebsd::B230400) +//! cfsetspeed(termios, termios::os::freebsd::B921600) //! } //! //! # let fd = 1; @@ -111,8 +111,7 @@ use libc::{c_int,pid_t}; pub use ::os::target::{cc_t,speed_t,tcflag_t}; // types pub use ::os::target::{VEOF,VEOL,VERASE,VINTR,VKILL,VMIN,VQUIT,VSTART,VSTOP,VSUSP,VTIME}; // c_cc subscripts pub use ::os::target::{BRKINT,ICRNL,IGNBRK,IGNCR,IGNPAR,INLCR,INPCK,ISTRIP,IXANY,IXOFF,IXON,PARMRK}; // input modes -#[cfg(any(target_os = "linux", target_os = "macos"))] pub use ::os::target::{OPOST,ONLCR,OCRNL,ONOCR,ONLRET,OFILL,NLDLY,NL0,NL1,CRDLY,CR0,CR1,CR2,CR3,TABDLY,TAB0,TAB1,TAB2,TAB3,BSDLY,BS0,BS1,VTDLY,VT0,VT1,FFDLY,FF0,FF1}; // output modes -#[cfg(target_os = "freebsd")] pub use ::os::target::{OPOST,ONLCR,TABDLY,TAB0,TAB3,ONOEOT,OCRNL,ONOCR,ONLRET}; // output modes +pub use ::os::target::{OPOST,ONLCR,OCRNL,TAB3,ONOCR,ONLRET}; // output modes pub use ::os::target::{B0,B50,B75,B110,B134,B150,B200,B300,B600,B1200,B1800,B2400,B4800,B9600,B19200,B38400}; // baud rate selection pub use ::os::target::{CSIZE,CS5,CS6,CS7,CS8,CSTOPB,CREAD,PARENB,PARODD,HUPCL,CLOCAL}; // control modes pub use ::os::target::{ECHO,ECHOE,ECHOK,ECHONL,ICANON,IEXTEN,ISIG,NOFLSH,TOSTOP}; // local modes diff --git a/src/os/freebsd.rs b/src/os/freebsd.rs index b9977f7..f4000be 100755 --- a/src/os/freebsd.rs +++ b/src/os/freebsd.rs @@ -62,6 +62,7 @@ pub const ONLCR: tcflag_t = 0x00000002; pub const TABDLY: tcflag_t = 0x00000004; pub const TAB0: tcflag_t = 0x00000000; pub const TAB3: tcflag_t = 0x00000004; +pub const OXTABS: tcflag_t = TAB3; pub const ONOEOT: tcflag_t = 0x00000008; pub const OCRNL: tcflag_t = 0x00000010; pub const ONOCR: tcflag_t = 0x00000020; @@ -86,6 +87,7 @@ pub const CRTS_IFLOW: tcflag_t = 0x00020000; pub const CDTR_IFLOW: tcflag_t = 0x00040000; pub const CDSR_OFLOW: tcflag_t = 0x00080000; pub const CCAR_OFLOW: tcflag_t = 0x00100000; +pub const MDMBUF: tcflag_t = CCAR_OFLOW; // c_lflag bits pub const ECHOKE: tcflag_t = 0x00000001; @@ -130,6 +132,8 @@ pub const B57600: speed_t = 57600; pub const B76800: speed_t = 76800; pub const B115200: speed_t = 115200; pub const B230400: speed_t = 230400; +pub const B460800: speed_t = 460800; +pub const B921600: speed_t = 921600; pub const EXTA: speed_t = 19200; pub const EXTB: speed_t = 38400; @@ -148,3 +152,4 @@ pub const TCIOFLUSH: c_int = 3; pub const TCSANOW: c_int = 0; pub const TCSADRAIN: c_int = 1; pub const TCSAFLUSH: c_int = 2; +pub const TCSASOFT: c_int = 0x10; |