Skip to content

Commit

Permalink
Merge branch 'bugfix/build-without-jtag' into 'main'
Browse files Browse the repository at this point in the history
build: fix build without usb serial jtag

See merge request espressif/esp-thread-br!13
  • Loading branch information
chshu committed Jun 29, 2022
2 parents 233edec + 6205116 commit ed1e6d9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/common/border_router_board/src/border_router_board.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "border_router_board.h"
#include "sdkconfig.h"

#if CONFIG_BR_BOARD_DEV_KIT
#if CONFIG_BR_BOARD_DEV_KIT && CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG

#include "esp_vfs_dev.h"
#include "esp_vfs_usb_serial_jtag.h"
Expand All @@ -26,19 +26,19 @@ void border_router_board_init(void)
esp_vfs_dev_usb_serial_jtag_set_tx_line_endings(ESP_LINE_ENDINGS_CRLF);

/* Enable non-blocking mode on stdin and stdout */
fcntl(fileno(stdout), F_SETFL, 0);
fcntl(fileno(stdin), F_SETFL, 0);
fcntl(fileno(stdout), F_SETFL, O_NONBLOCK);
fcntl(fileno(stdin), F_SETFL, O_NONBLOCK);

usb_serial_jtag_driver_config_t usb_serial_jtag_config = USB_SERIAL_JTAG_DRIVER_CONFIG_DEFAULT();
usb_serial_jtag_driver_install(&usb_serial_jtag_config);
esp_vfs_usb_serial_jtag_use_driver();
esp_vfs_dev_uart_register();
}

#else // CONFIG_BR_BOARD_DEV_KIT
#else // CONFIG_BR_BOARD_DEV_KIT && CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG

void border_router_board_init(void)
{
}

#endif // CONFIG_BR_BOARD_DEV_KIT
#endif // CONFIG_BR_BOARD_DEV_KIT && CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG

0 comments on commit ed1e6d9

Please sign in to comment.