Skip to content

Commit 74b7d85

Browse files
feat(modem): added config_edrx api function
1 parent 317faf8 commit 74b7d85

File tree

5 files changed

+17
-20
lines changed

5 files changed

+17
-20
lines changed

.pre-commit-config.yaml

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v5.0.0
5+
rev: v4.3.0
66
hooks:
77
- id: check-yaml
88
- id: check-added-large-files
@@ -13,12 +13,12 @@ repos:
1313
- id: mixed-line-ending
1414
- id: debug-statements
1515
- repo: https://github.com/pycqa/flake8
16-
rev: 7.1.2
16+
rev: 5.0.4
1717
hooks:
1818
- id: flake8
1919
args: ['--config=.flake8', '--tee', '--benchmark']
2020
- repo: https://github.com/pre-commit/mirrors-mypy
21-
rev: v1.14.1
21+
rev: v0.981
2222
hooks:
2323
- id: mypy
2424
exclude: >
@@ -39,25 +39,25 @@ repos:
3939
hooks:
4040
- id: isort
4141
- repo: https://github.com/myint/eradicate/
42-
rev: 2.3.0
42+
rev: v2.1.0
4343
hooks:
4444
- id: eradicate
4545
- repo: https://github.com/espressif/check-copyright/
46-
rev: v1.1.0
46+
rev: v1.0.3
4747
hooks:
4848
- id: check-copyright
4949
args: ['--ignore', 'ci/check_copyright_ignore.txt', '--config', 'ci/check_copyright_config.yaml']
5050
- repo: https://github.com/igrr/astyle_py.git
51-
rev: v1.1.0
51+
rev: v1.0.5
5252
hooks:
5353
- id: astyle_py
5454
args: ['--style=otbs', '--attach-namespaces', '--attach-classes', '--indent=spaces=4', '--convert-tabs', '--align-reference=name', '--keep-one-line-statements', '--pad-header', '--pad-oper', '--unpad-paren', '--max-continuation-indent=120', '--exclude-list=ci/ignore_astyle.txt']
5555
- repo: https://github.com/commitizen-tools/commitizen
56-
rev: v4.4.1
56+
rev: v2.42.1
5757
hooks:
5858
- id: commitizen
5959
- id: commitizen-branch
60-
stages: [pre-push, manual]
60+
stages: [push, manual]
6161
- repo: local
6262
hooks:
6363
- id: commit message scopes

components/esp_modem/include/cxx17_include/esp_modem_command_library_17.hpp

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
#include "cxx_include/esp_modem_dte.hpp"
1010
#include "cxx_include/esp_modem_dce_module.hpp"
1111

12-
static const char *TAG = "command_lib";
13-
1412
namespace esp_modem::dce_commands {
1513
command_result generic_command(CommandableIf *t, const std::string &command,
1614
const std::list<std::string_view> &pass_phrase,

components/esp_modem/include/esp_modem_c_api_types.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ esp_err_t esp_modem_set_apn(esp_modem_dce_t *dce, const char *apn);
163163
esp_err_t esp_modem_set_urc(esp_modem_dce_t *dce, esp_err_t(*got_line_cb)(uint8_t *data, size_t len));
164164
#endif
165165

166-
esp_err_t esp_modem_sqns_gm02s_connect(esp_modem_dce_t *dce, const esp_modem_PdpContext_t *pdp_context);
166+
esp_err_t esp_modem_sqn_gm02s_connect(esp_modem_dce_t *dce, const esp_modem_PdpContext_t *pdp_context);
167167

168168
/**
169169
* @brief This API provides support for temporarily pausing networking in order

components/esp_modem/src/esp_modem_c_api.cpp

+7-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -454,8 +454,7 @@ extern "C" esp_err_t esp_modem_config_psm(esp_modem_dce_t *dce_wrap, int mode, c
454454

455455
extern "C" esp_err_t esp_modem_config_network_registration_urc(esp_modem_dce_t *dce_wrap, int value)
456456
{
457-
if (dce_wrap == nullptr || dce_wrap->dce == nullptr || value > 5)
458-
{
457+
if (dce_wrap == nullptr || dce_wrap->dce == nullptr || value > 5) {
459458
return ESP_ERR_INVALID_ARG;
460459
}
461460

@@ -486,23 +485,22 @@ extern "C" esp_err_t esp_modem_config_mobile_termination_error(esp_modem_dce_t *
486485
return command_response_to_esp_err(dce_wrap->dce->config_mobile_termination_error(mode));
487486
}
488487

489-
extern "C" esp_err_t esp_modem_config_edrx(esp_modem_dce_t *dce_wrap, int mode, int access_technology, const char *edrx_value, const char *ptw_value)
488+
extern "C" esp_err_t esp_modem_config_edrx(esp_modem_dce_t *dce_wrap, int mode, int access_technology, const char *edrx_value)
490489
{
491490
if (dce_wrap == nullptr || dce_wrap->dce == nullptr || mode > 3 || access_technology > 5) {
492491
return ESP_ERR_INVALID_ARG;
493492
}
494493

495-
if ((mode == 1 || mode == 2 ) && (strlen(edrx_value) != 4 || strlen(ptw_value) != 4)) {
494+
if ((mode == 1 || mode == 2) && strlen(edrx_value) != 4) {
496495
return ESP_ERR_INVALID_ARG;
497496
}
498497

499-
return command_response_to_esp_err(dce_wrap->dce->config_edrx(mode,access_technology,std::string(edrx_value),std::string(ptw_value)));
498+
return command_response_to_esp_err(dce_wrap->dce->config_edrx(mode, access_technology, std::string(edrx_value)));
500499
}
501500

502-
extern "C" esp_err_t esp_modem_sqns_gm02s_connect(esp_modem_dce_t *dce_wrap, const esp_modem_PdpContext_t *pdp_context)
501+
extern "C" esp_err_t esp_modem_sqn_gm02s_connect(esp_modem_dce_t *dce_wrap, const esp_modem_PdpContext_t *pdp_context)
503502
{
504-
if (dce_wrap == nullptr || dce_wrap->dce == nullptr)
505-
{
503+
if (dce_wrap == nullptr || dce_wrap->dce == nullptr) {
506504
return ESP_ERR_INVALID_ARG;
507505
}
508506

components/esp_modem/src/esp_modem_command_library.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
namespace esp_modem::dce_commands {
1818

19+
static const char *TAG = "command_lib";
1920

2021
command_result generic_command(CommandableIf *t, const std::string &command,
2122
const std::list<std::string_view> &pass_phrase,

0 commit comments

Comments
 (0)