Browse Source

changes to an unused function

master
tth 4 months ago
parent
commit
5b6359ce9e
2 changed files with 4 additions and 15 deletions
  1. +2
    -14
      functions/serial.c
  2. +2
    -1
      functions/serial.h

+ 2
- 14
functions/serial.c View File

@ -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;


+ 2
- 1
functions/serial.h View File

@ -4,4 +4,5 @@
*/
int open_serial(char *dev, int bauds, int unused);
int bauds_str_to_B(char *strb, int unused);
int bauds_to_B(int bauds);

Loading…
Cancel
Save