File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,9 @@ long select_unix_serial_speed(long n) {
42
42
return B19200 ;
43
43
case 38400 :
44
44
return B38400 ;
45
- // extra baud rates (but not posix)
45
+ #ifdef B4000000
46
+ // extra baud rates are not POSIX standard
47
+ // but supported by Linux and FreeBSD
46
48
case 57600 :
47
49
return B57600 ;
48
50
case 115200 :
@@ -53,14 +55,10 @@ long select_unix_serial_speed(long n) {
53
55
return B460800 ;
54
56
case 500000 :
55
57
return B500000 ;
56
- case 576000 :
57
- return B576000 ;
58
58
case 921600 :
59
59
return B921600 ;
60
60
case 1000000 :
61
61
return B1000000 ;
62
- case 1152000 :
63
- return B1152000 ;
64
62
case 1500000 :
65
63
return B1500000 ;
66
64
case 2000000 :
@@ -73,6 +71,15 @@ long select_unix_serial_speed(long n) {
73
71
return B3500000 ;
74
72
case 4000000 :
75
73
return B4000000 ;
74
+ #endif
75
+ #ifdef B576000
76
+ // Following baud rates are supported in Linux but
77
+ // not defined in FreeBSD
78
+ case 576000 :
79
+ return B576000 ;
80
+ case 1152000 :
81
+ return B1152000 ;
82
+ #endif
76
83
}
77
84
return B9600 ;
78
85
}
You can’t perform that action at this time.
0 commit comments