1
0
mirror of https://github.com/UzixLS/picocom.git synced 2025-07-19 07:21:18 +03:00

Added term_baud_ok(). Check if baudrate is valid.

This commit is contained in:
Nick Patavalis
2015-08-22 16:49:57 +03:00
parent 991ddfe638
commit 5916997d40
2 changed files with 17 additions and 0 deletions

10
term.c
View File

@ -270,6 +270,16 @@ Bspeed(speed_t code)
return speed;
}
int
term_baud_ok(int baud)
{
#ifndef USE_CUSTOM_BAUD
return (Bcode(baud) != BNONE) ? 1 : 0;
#else
return (baud >= 0);
#endif
}
/**************************************************************************/
static int