Skip to content

Commit afa4104

Browse files
committed
Merge branch 'feature/support_configurable_uart_cmd' into 'master'
feat: Supported configurable uart commands See merge request application/esp-at!1515
2 parents 5591f3b + 62abafd commit afa4104

File tree

3 files changed

+34
-26
lines changed

3 files changed

+34
-26
lines changed

components/at/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ list(APPEND srcs "src/at_default_config.c")
1111
list(APPEND srcs "src/at_init.c")
1212
list(APPEND srcs "src/at_workaround.c")
1313
list(APPEND srcs "src/at_cmd_register.c")
14+
if (CONFIG_AT_UART_COMMAND_SUPPORT)
15+
list(APPEND srcs "src/at_uart_cmd.c")
16+
endif()
1417
if (CONFIG_BOOTLOADER_COMPRESSED_ENABLED)
1518
list(APPEND srcs "src/at_compress_ota.c")
1619
endif()

components/at/src/at_uart_cmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <stdbool.h>
99
#include "sdkconfig.h"
1010

11-
#ifdef CONFIG_AT_BASE_ON_UART
11+
#ifdef CONFIG_AT_UART_COMMAND_SUPPORT
1212
#include "driver/uart.h"
1313
#include "hal/uart_types.h"
1414
#include "freertos/FreeRTOS.h"

main/interface/uart/Kconfig

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,38 @@ config AT_BASE_ON_UART
22
bool "AT through UART"
33

44
if AT_BASE_ON_UART
5-
menu "AT uart settings"
65

7-
config AT_UART_DEFAULT_DATABITS
8-
int "the uart data bits for AT port, the range is [5, 8]"
9-
default 8
10-
range 5 8
11-
depends on AT_BASE_ON_UART
6+
config AT_UART_COMMAND_SUPPORT
7+
bool "Support UART AT commands"
8+
default "y"
129

13-
config AT_UART_DEFAULT_STOPBITS
14-
int "the uart stop bit for AT port, the range is [1, 3]"
15-
help
16-
1: 1-bit stop bit; 2: 1.5-bit stop bit; 3: 2-bit stop bit
17-
default 1
18-
range 1 3
10+
menu "AT uart settings"
11+
config AT_UART_DEFAULT_DATABITS
12+
int "the uart data bits for AT port, the range is [5, 8]"
13+
default 8
14+
range 5 8
15+
depends on AT_BASE_ON_UART
1916

20-
config AT_UART_DEFAULT_PARITY_BITS
21-
int "the uart parity bit for AT port, the range is [0, 2]"
22-
help
23-
0: None; 1: Odd; 2: Even
24-
default 0
25-
range 0 2
17+
config AT_UART_DEFAULT_STOPBITS
18+
int "the uart stop bit for AT port, the range is [1, 3]"
19+
help
20+
1: 1-bit stop bit; 2: 1.5-bit stop bit; 3: 2-bit stop bit
21+
default 1
22+
range 1 3
23+
24+
config AT_UART_DEFAULT_PARITY_BITS
25+
int "the uart parity bit for AT port, the range is [0, 2]"
26+
help
27+
0: None; 1: Odd; 2: Even
28+
default 0
29+
range 0 2
30+
31+
config AT_UART_DEFAULT_FLOW_CONTROL
32+
int "the uart flow control for AT port, the range is [0, 3]"
33+
help
34+
0: flow control is disabled; 1: enable RTS; 2: enable CTS; 3: enable RTS and CTS
35+
default 1
36+
range 0 3
37+
endmenu
2638

27-
config AT_UART_DEFAULT_FLOW_CONTROL
28-
int "the uart flow control for AT port, the range is [0, 3]"
29-
help
30-
0: flow control is disabled; 1: enable RTS; 2: enable CTS; 3: enable RTS and CTS
31-
default 1
32-
range 0 3
33-
endmenu
3439
endif

0 commit comments

Comments
 (0)