Skip to content

Commit

Permalink
Merge branch 'docs/update_code_how_to_configure_multiple_antennas_of_…
Browse files Browse the repository at this point in the history
…wifi_v5.1' into 'release/v5.1'

docs: update code of how to configure multiple antennas of wifi (v5.1)

See merge request espressif/esp-idf!24456
  • Loading branch information
ESP-Marius committed Jul 3, 2023
2 parents 679ac08 + 09d8803 commit cc74be8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions docs/en/api-guides/wifi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,7 @@ The table below shows the reason-code defined in {IDF_TARGET_NAME}. The first co
* - Reserved
- 40 ~ 45
- 40 ~ 45
-
-
* - PEER_INITIATED
- 46
- 46
Expand Down Expand Up @@ -2172,10 +2172,11 @@ Generally, following steps can be taken to configure the multiple antennas:

- Configure which GPIOs are connected to the antenna_selects. For example, if four antennas are supported and GPIO20/GPIO21 are connected to antenna_select[0]/antenna_select[1], the configurations look like::

wifi_ant_gpio_config_t config = {
{ .gpio_select = 1, .gpio_num = 20 },
{ .gpio_select = 1, .gpio_num = 21 }
wifi_ant_gpio_config_t ant_gpio_config = {
.gpio_cfg[0] = { .gpio_select = 1, .gpio_num = 20 },
.gpio_cfg[1] = { .gpio_select = 1, .gpio_num = 21 }
};
- Configure which antennas are enabled and how RX/TX use the enabled antennas. For example, if antenna1 and antenna3 are enabled, the RX needs to select the better antenna automatically and uses antenna1 as its default antenna, the TX always selects the antenna3. The configuration looks like::

wifi_ant_config_t config = {
Expand Down
6 changes: 3 additions & 3 deletions docs/zh_CN/api-guides/wifi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2172,9 +2172,9 @@ Wi-Fi 多根天线配置

- 配置 antenna_selects 连接哪些 GPIOs,例如,如果支持四根天线,且 GPIO20/GPIO21 连接到 antenna_select[0]/antenna_select[1],配置如下所示::

wifi_ant_gpio_config_t config = {
{ .gpio_select = 1, .gpio_num = 20 },
{ .gpio_select = 1, .gpio_num = 21 }
wifi_ant_gpio_config_t ant_gpio_config = {
.gpio_cfg[0] = { .gpio_select = 1, .gpio_num = 20 },
.gpio_cfg[1] = { .gpio_select = 1, .gpio_num = 21 }
};
- 配置使能哪些天线、以及接收/发送数据如何使用使能的天线,例如,如果使能了天线 1 和天线 3,接收数据需要自动选择较好的天线,并将天线 1 作为默认天线,发送数据始终选择天线 3。配置如下所示::

Expand Down

0 comments on commit cc74be8

Please sign in to comment.