mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-07 13:37:21 +00:00
netutils/esp8266/: CONFIG_SERIAL_TERMIOS must be defined in order to set BAUD
This commit is contained in:
parent
8f0e214772
commit
ee8a62f009
1 changed files with 4 additions and 0 deletions
|
|
@ -175,6 +175,7 @@ lesp_state_t g_lesp_state =
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SERIAL_TERMIOS
|
||||
static int lesp_set_baudrate(int baudrate)
|
||||
{
|
||||
struct termios term;
|
||||
|
|
@ -200,6 +201,7 @@ static int lesp_set_baudrate(int baudrate)
|
|||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: get_sock
|
||||
|
|
@ -921,11 +923,13 @@ int lesp_initialize(void)
|
|||
ret = -1;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SERIAL_TERMIOS
|
||||
if (ret >= 0 && lesp_set_baudrate(CONFIG_NETUTILS_ESP8266_BAUDRATE) < 0)
|
||||
{
|
||||
ndbg("Cannot set baud rate %d\n", CONFIG_NETUTILS_ESP8266_BAUDRATE);
|
||||
ret = -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((ret >= 0) && (g_lesp_state.worker.running == false))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue