Applied astyle code formatting

This commit is contained in:
David Cermak
2021-06-01 10:21:51 +02:00
parent dc64f862c4
commit a61e9e2d40
43 changed files with 865 additions and 662 deletions

View File

@ -52,8 +52,8 @@ template<class SpecificModule>
class DCE_T {
static_assert(std::is_base_of<ModuleIf, SpecificModule>::value, "DCE must be instantiated with Module class only");
public:
explicit DCE_T(const std::shared_ptr<DTE>& dte, std::shared_ptr<SpecificModule> dev, esp_netif_t * netif):
dte(dte), device(std::move(dev)), netif(dte, netif)
explicit DCE_T(const std::shared_ptr<DTE> &dte, std::shared_ptr<SpecificModule> dev, esp_netif_t *netif):
dte(dte), device(std::move(dev)), netif(dte, netif)
{ }
~DCE_T() = default;
@ -61,20 +61,35 @@ public:
/**
* @brief Set data mode!
*/
void set_data() { set_mode(modem_mode::DATA_MODE); }
void set_data()
{
set_mode(modem_mode::DATA_MODE);
}
void exit_data() { set_mode(modem_mode::COMMAND_MODE); }
void exit_data()
{
set_mode(modem_mode::COMMAND_MODE);
}
void set_cmux() { set_mode(modem_mode::CMUX_MODE); }
void set_cmux()
{
set_mode(modem_mode::CMUX_MODE);
}
SpecificModule* get_module() { return device.get(); }
SpecificModule *get_module()
{
return device.get();
}
command_result command(const std::string& command, got_line_cb got_line, uint32_t time_ms)
command_result command(const std::string &command, got_line_cb got_line, uint32_t time_ms)
{
return dte->command(command, std::move(got_line), time_ms);
}
bool set_mode(modem_mode m) { return mode.set(dte.get(), device.get(), netif, m); }
bool set_mode(modem_mode m)
{
return mode.set(dte.get(), device.get(), netif, m);
}
protected:
std::shared_ptr<DTE> dte;
@ -98,7 +113,10 @@ public:
return device->name(std::forward<Agrs>(args)...); \
}
DECLARE_ALL_COMMAND_APIS(forwards name(...) { device->name(...); } )
DECLARE_ALL_COMMAND_APIS(forwards name(...)
{
device->name(...);
} )
#undef ESP_MODEM_DECLARE_DCE_COMMAND