mirror of
https://github.com/esp-rs/esp-hal.git
synced 2025-09-28 12:50:53 +00:00
229 lines
8.6 KiB
YAML
229 lines
8.6 KiB
YAML
crate: esp-radio
|
|
|
|
options:
|
|
- name: rx_queue_size
|
|
description: Size of the RX queue in frames
|
|
default:
|
|
- value: 5
|
|
constraints:
|
|
- type:
|
|
validator: positive_integer
|
|
|
|
- name: tx_queue_size
|
|
description: Size of the TX queue in frames
|
|
default:
|
|
- value: 3
|
|
constraints:
|
|
- type:
|
|
validator: positive_integer
|
|
|
|
- name: static_rx_buf_num
|
|
description: "Max number of WiFi static RX buffers.<br>
|
|
Each buffer takes approximately 1.6KB of RAM.
|
|
The static rx buffers are allocated when esp_wifi_init is called, they are not freed
|
|
until esp_wifi_deinit is called.<br>
|
|
WiFi hardware use these buffers to receive all 802.11 frames.
|
|
A higher number may allow higher throughput but increases memory use. If ESP_WIFI_AMPDU_RX_ENABLED
|
|
is enabled, this value is recommended to set equal or bigger than ESP_WIFI_RX_BA_WIN in order to
|
|
achieve better throughput and compatibility with both stations and APs."
|
|
default:
|
|
- value: 10
|
|
constraints:
|
|
- type:
|
|
validator: integer_in_range
|
|
value:
|
|
start: 0
|
|
end: 129
|
|
|
|
- name: dynamic_rx_buf_num
|
|
description: "Max number of WiFi dynamic RX buffers<br>
|
|
Set the number of WiFi dynamic RX buffers, 0 means unlimited RX buffers will be allocated
|
|
(provided sufficient free RAM). The size of each dynamic RX buffer depends on the size of
|
|
the received data frame.<br>
|
|
For each received data frame, the WiFi driver makes a copy to an RX buffer and then delivers
|
|
it to the high layer TCP/IP stack. The dynamic RX buffer is freed after the higher layer has
|
|
successfully received the data frame.<br>
|
|
For some applications, WiFi data frames may be received faster than the application can
|
|
process them. In these cases we may run out of memory if RX buffer number is unlimited (0).<br>
|
|
If a dynamic RX buffer limit is set, it should be at least the number of static RX buffers."
|
|
default:
|
|
- value: 32
|
|
constraints:
|
|
- type:
|
|
validator: integer_in_range
|
|
value:
|
|
start: 0
|
|
end: 1025
|
|
|
|
- name: static_tx_buf_num
|
|
description: "Set the number of WiFi static TX buffers. Each buffer takes approximately 1.6KB of RAM.
|
|
The static RX buffers are allocated when esp_wifi_init() is called, they are not released
|
|
until esp_wifi_deinit() is called.<br>
|
|
For each transmitted data frame from the higher layer TCP/IP stack, the WiFi driver makes a
|
|
copy of it in a TX buffer. For some applications especially UDP applications, the upper
|
|
layer can deliver frames faster than WiFi layer can transmit. In these cases, we may run out
|
|
of TX buffers."
|
|
default:
|
|
- value: 0
|
|
constraints:
|
|
- type:
|
|
validator: integer_in_range
|
|
value:
|
|
start: 0
|
|
end: 65
|
|
|
|
- name: dynamic_tx_buf_num
|
|
description: "Set the number of WiFi dynamic TX buffers. The size of each dynamic TX buffer is not fixed,
|
|
it depends on the size of each transmitted data frame.<br>
|
|
For each transmitted frame from the higher layer TCP/IP stack, the WiFi driver makes a copy
|
|
of it in a TX buffer. For some applications, especially UDP applications, the upper layer
|
|
can deliver frames faster than WiFi layer can transmit. In these cases, we may run out of TX
|
|
buffers."
|
|
default:
|
|
- value: 32
|
|
constraints:
|
|
- type:
|
|
validator: integer_in_range
|
|
value:
|
|
start: 0
|
|
end: 129
|
|
|
|
- name: ampdu_rx_enable
|
|
description: "Select this option to enable AMPDU RX feature"
|
|
default:
|
|
- value: true
|
|
|
|
- name: ampdu_tx_enable
|
|
description: "Select this option to enable AMPDU TX feature"
|
|
default:
|
|
- value: true
|
|
|
|
- name: amsdu_tx_enable
|
|
description: "Select this option to enable AMSDU TX feature. (If ESP_WIFI_CONFIG_CACHE_TX_BUFFER_NUM >= 2)"
|
|
default:
|
|
- value: false
|
|
|
|
- name: rx_ba_win
|
|
description: "Set the size of WiFi Block Ack RX window. Generally a bigger value means higher throughput and better
|
|
compatibility but more memory. Most of time we should NOT change the default value unless special
|
|
reason, e.g. test the maximum UDP RX throughput with iperf etc. For iperf test in shieldbox, the
|
|
recommended value is 9~12. If PSRAM is used and WiFi memory is preferred to allocate in PSRAM first,
|
|
the default and minimum value should be 16 to achieve better throughput and compatibility with both
|
|
stations and APs."
|
|
default:
|
|
- value: 6
|
|
constraints:
|
|
- type:
|
|
validator: integer_in_range
|
|
value:
|
|
start: 2
|
|
end: 65
|
|
|
|
- name: max_burst_size
|
|
description: See [smoltcp's documentation](https://docs.rs/smoltcp/0.10.0/smoltcp/phy/struct.DeviceCapabilities.html#structfield.max_burst_size)
|
|
default:
|
|
- value: 1
|
|
|
|
- name: country_code
|
|
description: "Country code. See
|
|
[ESP-IDF Programming Guide](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/wifi.html#wi-fi-country-code)"
|
|
default:
|
|
- value: '"CN"'
|
|
|
|
- name: country_code_operating_class
|
|
description: 'If not 0: Operating Class table number. See
|
|
[ESP-IDF Programming Guide](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/wifi.html#wi-fi-country-code)'
|
|
default:
|
|
- value: 0
|
|
|
|
- name: mtu
|
|
description: "MTU, see [smoltcp's documentation](https://docs.rs/smoltcp/0.10.0/smoltcp/phy/struct.DeviceCapabilities.html#structfield.max_transmission_unit)"
|
|
default:
|
|
- value: 1492
|
|
constraints:
|
|
- type:
|
|
validator: positive_integer
|
|
|
|
- name: listen_interval
|
|
description: 'Interval for station to listen to beacon from AP.
|
|
The unit of listen interval is one beacon interval.
|
|
For example, if beacon interval is 100 ms and listen interval is 3,
|
|
the interval for station to listen to beacon is 300 ms'
|
|
default:
|
|
- value: 3
|
|
|
|
- name: beacon_timeout
|
|
description: 'For Station, If the station does not receive a beacon frame
|
|
from the connected SoftAP during the inactive time, disconnect from SoftAP.
|
|
Default 6s. Range 6-30'
|
|
default:
|
|
- value: 6
|
|
constraints:
|
|
- type:
|
|
validator: integer_in_range
|
|
value:
|
|
start: 6
|
|
end: 31
|
|
|
|
- name: ap_beacon_timeout
|
|
description: "For SoftAP, If the SoftAP doesn't receive any data from the connected STA
|
|
during inactive time, the SoftAP will force deauth the STA. Default is 300s"
|
|
default:
|
|
- value: 300
|
|
|
|
- name: failure_retry_cnt
|
|
description: "Number of connection retries station will do before moving to next AP.
|
|
scan_method should be set as WIFI_ALL_CHANNEL_SCAN to use this config.
|
|
Note: Enabling this may cause connection time to increase incase best AP
|
|
doesn't behave properly. Defaults to 1"
|
|
default:
|
|
- value: 1
|
|
constraints:
|
|
- type:
|
|
validator: positive_integer
|
|
|
|
- name: scan_method
|
|
description: "0 = WIFI_FAST_SCAN, 1 = WIFI_ALL_CHANNEL_SCAN, defaults to 0"
|
|
default:
|
|
- value: 0
|
|
constraints:
|
|
- type:
|
|
validator: integer_in_range
|
|
value:
|
|
start: 0
|
|
end: 2
|
|
|
|
- name: dump_packets
|
|
description: "Dump packets via an info log statement"
|
|
default:
|
|
- value: false
|
|
|
|
- name: phy_enable_usb
|
|
description: "Keeps USB running when using WiFi.
|
|
This allows debugging and log messages via USB Serial JTAG.
|
|
Turn off for best WiFi performance."
|
|
default:
|
|
- value: true
|
|
|
|
- name: phy_skip_calibration_after_deep_sleep
|
|
description: "Use PHY_RF_CAL_NONE after deep sleep."
|
|
default:
|
|
- value: false
|
|
|
|
- name: phy_full_calibration
|
|
description: "Use PHY_RF_CAL_FULL instead of PHY_RF_CAL_PARTIAL."
|
|
default:
|
|
- value: true
|
|
|
|
- name: ieee802154_rx_queue_size
|
|
description: Size of the RX queue in frames
|
|
default:
|
|
- value: 10
|
|
constraints:
|
|
- type:
|
|
validator: positive_integer
|
|
|
|
checks:
|
|
- 'ESP_RADIO_CONFIG_RX_BA_WIN < ESP_RADIO_CONFIG_DYNAMIC_RX_BUF_NUM'
|
|
- 'ESP_RADIO_CONFIG_RX_BA_WIN < (ESP_RADIO_CONFIG_STATIC_RX_BUF_NUM * 2)'
|