github.com/mvdan/u-root-coreutils@v0.0.0-20230122170626-c2eef2898555/pkg/termios/var_freebsd.go (about) 1 // Copyright 2021 the u-root Authors. All rights reserved 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package termios 6 7 import ( 8 "golang.org/x/sys/unix" 9 ) 10 11 // baud2unixB convert a baudrate to the corresponding unix const. 12 var baud2unixB = map[int]uint32{ 13 50: unix.B50, 14 75: unix.B75, 15 110: unix.B110, 16 134: unix.B134, 17 150: unix.B150, 18 200: unix.B200, 19 300: unix.B300, 20 600: unix.B600, 21 1200: unix.B1200, 22 1800: unix.B1800, 23 2400: unix.B2400, 24 4800: unix.B4800, 25 9600: unix.B9600, 26 19200: unix.B19200, 27 38400: unix.B38400, 28 57600: unix.B57600, 29 115200: unix.B115200, 30 230400: unix.B230400, 31 } 32 33 func toTermiosCflag(r uint32) uint32 { return r }