File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -267,6 +267,12 @@ pub fn cfgetospeed(termios: &Termios) -> BaudRate {
267
267
}
268
268
}
269
269
270
+ pub fn cfmakeraw ( termios : & mut Termios ) {
271
+ unsafe {
272
+ libc:: cfmakeraw ( & mut termios. termios ) ;
273
+ }
274
+ }
275
+
270
276
pub fn cfsetispeed ( termios : & mut Termios , baud : BaudRate ) -> Result < ( ) > {
271
277
Errno :: result ( unsafe {
272
278
libc:: cfsetispeed ( & mut termios. termios , baud as speed_t )
@@ -279,6 +285,12 @@ pub fn cfsetospeed(termios: &mut Termios, baud: BaudRate) -> Result<()> {
279
285
} ) . map ( drop)
280
286
}
281
287
288
+ pub fn cfsetspeed ( termios : & mut Termios , baud : BaudRate ) -> Result < ( ) > {
289
+ Errno :: result ( unsafe {
290
+ libc:: cfsetspeed ( & mut termios. termios , baud as speed_t )
291
+ } ) . map ( drop)
292
+ }
293
+
282
294
pub fn tcgetattr ( fd : RawFd ) -> Result < Termios > {
283
295
let mut termios: Termios = unsafe { mem:: uninitialized ( ) } ;
284
296
You can’t perform that action at this time.
0 commit comments