Skip to content

Commit

Permalink
uart mode
Browse files Browse the repository at this point in the history
  • Loading branch information
markirb committed Jun 17, 2024
1 parent 25f1234 commit e47cfba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/shelly_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ std::vector<std::unique_ptr<Component>> g_comps;
void RestoreUART() {
struct mgos_uart_config ucfg;
int uart_no = 0;
mgos_uart_config_set_defaults(uart_no, &ucfg);

if (!mgos_uart_configure(uart_no, &ucfg)) {
LOG(LL_ERROR, ("Failed to configure UART%d", uart_no));
if(mgos_uart_config_get(uart_no, &ucfg){
if (!mgos_uart_configure(uart_no, &ucfg)) {
LOG(LL_ERROR, ("Failed to configure UART%d", uart_no));
}
}
}

Expand Down

0 comments on commit e47cfba

Please sign in to comment.