Skip to content

Commit

Permalink
address the comments
Browse files Browse the repository at this point in the history
  • Loading branch information
chshu committed Nov 11, 2021
1 parent 01dc1c3 commit 283e60a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/all-clusters-app/esp32/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -582,12 +582,12 @@ extern "C" void app_main()
chip::DeviceLayer::PlatformMgr().ScheduleWork(InitServer, reinterpret_cast<intptr_t>(nullptr));

// Print QR Code URL
PrintOnboardingCodes(chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE));
PrintOnboardingCodes(chip::RendezvousInformationFlags(CONFIG_RENDEZVOUS_MODE));

#if CONFIG_HAVE_DISPLAY
std::string qrCodeText;

GetQRCode(qrCodeText, chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE));
GetQRCode(qrCodeText, chip::RendezvousInformationFlags(CONFIG_RENDEZVOUS_MODE));

// Initialize the display device.
err = InitDisplay();
Expand Down
6 changes: 3 additions & 3 deletions src/lib/shell/streamer_esp32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ int streamer_esp32_init(streamer_t * streamer)
esp_vfs_dev_uart_port_set_rx_line_endings(CONFIG_ESP_CONSOLE_UART_NUM, ESP_LINE_ENDINGS_CR);
esp_vfs_dev_uart_port_set_tx_line_endings(CONFIG_ESP_CONSOLE_UART_NUM, ESP_LINE_ENDINGS_CRLF);

ESP_ERROR_CHECK(uart_driver_install(UART_NUM_0, 256, 0, 0, NULL, 0));
ESP_ERROR_CHECK(uart_driver_install(CONFIG_ESP_CONSOLE_UART_NUM, 256, 0, 0, NULL, 0));
uart_config_t uart_config = {
.baud_rate = 115200,
.data_bits = UART_DATA_8_BITS,
Expand All @@ -62,7 +62,7 @@ int streamer_esp32_init(streamer_t * streamer)
.rx_flow_ctrl_thresh = 0,
.source_clk = UART_SCLK_APB,
};
ESP_ERROR_CHECK(uart_param_config(UART_NUM_0, &uart_config));
ESP_ERROR_CHECK(uart_param_config(CONFIG_ESP_CONSOLE_UART_NUM, &uart_config));
esp_vfs_dev_uart_use_driver(0);
esp_console_config_t console_config = {
.max_cmdline_length = 256,
Expand Down Expand Up @@ -90,7 +90,7 @@ ssize_t streamer_esp32_read(streamer_t * streamer, char * buf, size_t len)

ssize_t streamer_esp32_write(streamer_t * streamer, const char * buf, size_t len)
{
return uart_write_bytes(UART_NUM_0, buf, len);
return uart_write_bytes(CONFIG_ESP_CONSOLE_UART_NUM, buf, len);
}

static streamer_t streamer_stdio = {
Expand Down

0 comments on commit 283e60a

Please sign in to comment.