forked from espressif/esp-protocols
Add: sim7070 support
This commit is contained in:
1 parent
d3f7ea67fb
commit
bb7f198bea
9 files changed
+44
-3
No files matched your search
@@ -54,6 +54,11 @@ std::unique_ptr<DCE> create_SIM7600_dce(const dce_config *config, std::shared_pt
|
||||
return create_modem_dce(dce_factory::ModemType::SIM7600, config, std::move(dte), netif);
|
||||
}
|
||||
|
||||
std::unique_ptr<DCE> create_SIM7070_dce(const dce_config *config, std::shared_ptr<DTE> dte, esp_netif_t *netif)
|
||||
{
|
||||
return create_modem_dce(dce_factory::ModemType::SIM7070, config, std::move(dte), netif);
|
||||
}
|
||||
|
||||
std::unique_ptr<DCE> create_SIM800_dce(const dce_config *config, std::shared_ptr<DTE> dte, esp_netif_t *netif)
|
||||
{
|
||||
return create_modem_dce(dce_factory::ModemType::SIM800, config, std::move(dte), netif);
|
||||
|
||||
@@ -59,6 +59,8 @@ static inline dce_factory::ModemType convert_modem_enum(esp_modem_dce_device_t m
|
||||
switch (module) {
|
||||
case ESP_MODEM_DCE_SIM7600:
|
||||
return esp_modem::dce_factory::ModemType::SIM7600;
|
||||
case ESP_MODEM_DCE_SIM7070:
|
||||
return esp_modem::dce_factory::ModemType::SIM7070;
|
||||
case ESP_MODEM_DCE_BG96:
|
||||
return esp_modem::dce_factory::ModemType::BG96;
|
||||
case ESP_MODEM_DCE_SIM800:
|
||||
|
||||
@@ -121,12 +121,18 @@ command_result power_down(CommandableIf *t)
|
||||
return generic_command(t, "AT+QPOWD=1\r", "POWERED DOWN", "ERROR", 1000);
|
||||
}
|
||||
|
||||
command_result power_down_sim7xxx(CommandableIf *t)
|
||||
command_result power_down_sim7600(CommandableIf *t)
|
||||
{
|
||||
ESP_LOGV(TAG, "%s", __func__ );
|
||||
return generic_command_common(t, "AT+CPOF\r", 1000);
|
||||
}
|
||||
|
||||
command_result power_down_sim7070(CommandableIf *t)
|
||||
{
|
||||
ESP_LOGV(TAG, "%s", __func__ );
|
||||
return generic_command(t, "AT+CPOWD=1\r", "POWER DOWN", "ERROR", 1000);
|
||||
}
|
||||
|
||||
command_result power_down_sim8xx(CommandableIf *t)
|
||||
{
|
||||
ESP_LOGV(TAG, "%s", __func__ );
|
||||
|
||||
@@ -57,7 +57,12 @@ command_result SIM7600::get_battery_status(int &voltage, int &bcs, int &bcl)
|
||||
|
||||
command_result SIM7600::power_down()
|
||||
{
|
||||
return dce_commands::power_down_sim7xxx(dte.get());
|
||||
return dce_commands::power_down_sim7600(dte.get());
|
||||
}
|
||||
|
||||
command_result SIM7070::power_down()
|
||||
{
|
||||
return dce_commands::power_down_sim7070(dte.get());
|
||||
}
|
||||
|
||||
command_result SIM800::power_down()
|
||||
|
||||
Reference in new issue
Block a user