This commit is contained in:
pnb 2016-06-11 12:51:56 +02:00
parent dab4105f80
commit 96853cfea1

View File

@ -175,29 +175,29 @@ lesp_state_t g_lesp_state =
****************************************************************************/
static int lesp_set_baudrate(int baudrate)
{
{
struct termios term;
if ( ioctl(g_lesp_state.fd,TCGETS,(unsigned long)&term) < 0 )
{
{
ndbg("TCGETS failed.\n");
return -1;
}
}
if ( ( cfsetispeed( &term, baudrate ) < 0 ) ||
( cfsetospeed( &term, baudrate ) < 0 ) )
{
{
ndbg("Connot set baudrate %0x08X\n",baudrate);
return -1;
}
}
if ( ioctl(g_lesp_state.fd,TCSETS,(unsigned long)&term) < 0 )
{
{
ndbg("TCSETS failed.\n");
return -1;
}
}
return 0;
}
}
/****************************************************************************
* Name: get_sock