Skip to content
Snippets Groups Projects
Commit 8cba3451 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Merge branch 'cfmakeraw__impl' into 'master'

cfmakeraw implementation proposal

See merge request !382
parents 26f55b30 c88279f2
No related branches found
No related tags found
1 merge request!382cfmakeraw implementation proposal
Pipeline #12052 failed
......@@ -168,3 +168,14 @@ pub unsafe extern "C" fn tcflow(fd: c_int, action: c_int) -> c_int {
// implementation-defined. we do the same.
sys_ioctl::ioctl(fd, sys_ioctl::TCXONC, action as *mut _)
}
#[no_mangle]
pub unsafe extern "C" fn cfmakeraw(termios_p: *mut termios) {
(*termios_p).c_iflag &= !(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|IXON) as u32;
(*termios_p).c_oflag &= !OPOST as u32;
(*termios_p).c_lflag &= !(ECHO|ECHONL|ICANON|ISIG|IEXTEN) as u32;
(*termios_p).c_cflag &= !(CSIZE|PARENB) as u32;
(*termios_p).c_cflag |= CS8 as u32;
(*termios_p).c_cc[VMIN] = 1;
(*termios_p).c_cc[VTIME] = 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment