|
|
|
@ -41,22 +41,10 @@ return fd;
@@ -41,22 +41,10 @@ return fd;
|
|
|
|
|
this will disconnect the line. |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
int bauds_str_to_B(char *strb, int unused) |
|
|
|
|
int bauds_to_B(int bauds) |
|
|
|
|
{ |
|
|
|
|
long value; |
|
|
|
|
|
|
|
|
|
#if DEBUG_LEVEL |
|
|
|
|
fprintf(stderr, "--> %s ( '%s' 0x%x )\n", __func__, strb, unused); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
if (1 != sscanf(strb, "%ld", &value)) { |
|
|
|
|
return B0; |
|
|
|
|
} |
|
|
|
|
#if DEBUG_LEVEL |
|
|
|
|
fprintf(stderr, " computed baudrate = %ld\n", value); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
switch (value) { |
|
|
|
|
switch (bauds) { |
|
|
|
|
case 50: return B50; |
|
|
|
|
case 75: return B75; |
|
|
|
|
case 110: return B110; |
|
|
|
|