uart/dte cleanup

This commit is contained in:
David Cermak
2021-04-18 19:14:22 +02:00
parent 7f8d27fcbc
commit 5e2b321c26
10 changed files with 103 additions and 120 deletions

View File

@ -32,7 +32,7 @@ static const char *TAG = "modem_api";
std::shared_ptr<DTE> create_uart_dte(const dte_config *config) {
TRY_CATCH_RET_NULL(
auto term = create_uart_terminal(config);
return std::make_shared<DTE>(std::move(term));
return std::make_shared<DTE>(config, std::move(term));
)
}
@ -56,4 +56,8 @@ std::unique_ptr<DCE> create_BG96_dce(const dce_config *config, std::shared_ptr<D
return create_modem_dce(dce_factory::Modem::BG96, config, std::move(dte), netif);
}
std::unique_ptr<DCE> create_generic_dce(const dce_config *config, std::shared_ptr<DTE> dte, esp_netif_t *netif) {
return create_modem_dce(dce_factory::Modem::GenericModule, config, std::move(dte), netif);
}
} // namespace esp_modem