Skip to content

Commit 6e981ff

Browse files
committed
fix(wifi_remote): Preprocess injected headers
1 parent 485d261 commit 6e981ff

File tree

5 files changed

+61
-61
lines changed

5 files changed

+61
-61
lines changed

components/esp_wifi_remote/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ idf_component_get_property(wifi esp_wifi COMPONENT_LIB)
4848

4949
# Update wifi include directories to prepend the injected dir with modified headers supporting SLAVE capability
5050
get_target_property(original_wifi_dirs ${wifi} INTERFACE_INCLUDE_DIRECTORIES)
51-
set(updated_wifi_dirs "${CMAKE_CURRENT_SOURCE_DIR}/include/injected" ${original_wifi_dirs})
51+
set(updated_wifi_dirs "${CMAKE_CURRENT_SOURCE_DIR}/${IDF_VER_DIR}/include/injected" ${original_wifi_dirs})
5252
set_target_properties(${wifi} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${updated_wifi_dirs}")
5353

5454
target_link_libraries(${wifi} PUBLIC ${COMPONENT_LIB})

components/esp_wifi_remote/idf_v5.5/include/injected/esp_wifi.h

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -123,55 +123,55 @@ typedef struct {
123123
int magic; /**< WiFi init magic number, it should be the last field */
124124
} wifi_init_config_t;
125125

126-
#ifdef CONFIG_ESP_WIFI_STATIC_TX_BUFFER_NUM
127-
#define WIFI_STATIC_TX_BUFFER_NUM CONFIG_ESP_WIFI_STATIC_TX_BUFFER_NUM
126+
#ifdef CONFIG_WIFI_RMT_STATIC_TX_BUFFER_NUM
127+
#define WIFI_STATIC_TX_BUFFER_NUM CONFIG_WIFI_RMT_STATIC_TX_BUFFER_NUM
128128
#else
129129
#define WIFI_STATIC_TX_BUFFER_NUM 0
130130
#endif
131131

132-
#ifdef CONFIG_ESP_WIFI_CACHE_TX_BUFFER_NUM
133-
#define WIFI_CACHE_TX_BUFFER_NUM CONFIG_ESP_WIFI_CACHE_TX_BUFFER_NUM
132+
#ifdef CONFIG_WIFI_RMT_CACHE_TX_BUFFER_NUM
133+
#define WIFI_CACHE_TX_BUFFER_NUM CONFIG_WIFI_RMT_CACHE_TX_BUFFER_NUM
134134
#else
135135
#define WIFI_CACHE_TX_BUFFER_NUM 0
136136
#endif
137137

138-
#ifdef CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM
139-
#define WIFI_DYNAMIC_TX_BUFFER_NUM CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM
138+
#ifdef CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM
139+
#define WIFI_DYNAMIC_TX_BUFFER_NUM CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM
140140
#else
141141
#define WIFI_DYNAMIC_TX_BUFFER_NUM 0
142142
#endif
143143

144-
#ifdef CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF
145-
#define WIFI_RX_MGMT_BUF_NUM_DEF CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF
144+
#ifdef CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF
145+
#define WIFI_RX_MGMT_BUF_NUM_DEF CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF
146146
#else
147147
#define WIFI_RX_MGMT_BUF_NUM_DEF 0
148148
#endif
149149

150-
#if CONFIG_ESP_WIFI_CSI_ENABLED
150+
#if CONFIG_WIFI_RMT_CSI_ENABLED
151151
#define WIFI_CSI_ENABLED 1
152152
#else
153153
#define WIFI_CSI_ENABLED 0
154154
#endif
155155

156-
#if CONFIG_ESP_WIFI_AMPDU_RX_ENABLED
156+
#if CONFIG_WIFI_RMT_AMPDU_RX_ENABLED
157157
#define WIFI_AMPDU_RX_ENABLED 1
158158
#else
159159
#define WIFI_AMPDU_RX_ENABLED 0
160160
#endif
161161

162-
#if CONFIG_ESP_WIFI_AMPDU_TX_ENABLED
162+
#if CONFIG_WIFI_RMT_AMPDU_TX_ENABLED
163163
#define WIFI_AMPDU_TX_ENABLED 1
164164
#else
165165
#define WIFI_AMPDU_TX_ENABLED 0
166166
#endif
167167

168-
#if CONFIG_ESP_WIFI_AMSDU_TX_ENABLED
168+
#if CONFIG_WIFI_RMT_AMSDU_TX_ENABLED
169169
#define WIFI_AMSDU_TX_ENABLED 1
170170
#else
171171
#define WIFI_AMSDU_TX_ENABLED 0
172172
#endif
173173

174-
#if CONFIG_ESP_WIFI_NVS_ENABLED
174+
#if CONFIG_WIFI_RMT_NVS_ENABLED
175175
#define WIFI_NVS_ENABLED 1
176176
#else
177177
#define WIFI_NVS_ENABLED 0
@@ -188,37 +188,37 @@ extern wifi_osi_funcs_t g_wifi_osi_funcs;
188188

189189
#define WIFI_INIT_CONFIG_MAGIC 0x1F2F3F4F
190190

191-
#ifdef CONFIG_ESP_WIFI_AMPDU_RX_ENABLED
192-
#define WIFI_DEFAULT_RX_BA_WIN CONFIG_ESP_WIFI_RX_BA_WIN
191+
#ifdef CONFIG_WIFI_RMT_AMPDU_RX_ENABLED
192+
#define WIFI_DEFAULT_RX_BA_WIN CONFIG_WIFI_RMT_RX_BA_WIN
193193
#else
194194
#define WIFI_DEFAULT_RX_BA_WIN 0 /* unused if ampdu_rx_enable == false */
195195
#endif
196196

197-
#if CONFIG_ESP_WIFI_TASK_PINNED_TO_CORE_1
197+
#if CONFIG_WIFI_RMT_TASK_PINNED_TO_CORE_1
198198
#define WIFI_TASK_CORE_ID 1
199199
#else
200200
#define WIFI_TASK_CORE_ID 0
201201
#endif
202202

203-
#ifdef CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN
204-
#define WIFI_SOFTAP_BEACON_MAX_LEN CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN
203+
#ifdef CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN
204+
#define WIFI_SOFTAP_BEACON_MAX_LEN CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN
205205
#else
206206
#define WIFI_SOFTAP_BEACON_MAX_LEN 752
207207
#endif
208208

209-
#ifdef CONFIG_ESP_WIFI_MGMT_SBUF_NUM
210-
#define WIFI_MGMT_SBUF_NUM CONFIG_ESP_WIFI_MGMT_SBUF_NUM
209+
#ifdef CONFIG_WIFI_RMT_MGMT_SBUF_NUM
210+
#define WIFI_MGMT_SBUF_NUM CONFIG_WIFI_RMT_MGMT_SBUF_NUM
211211
#else
212212
#define WIFI_MGMT_SBUF_NUM 32
213213
#endif
214214

215-
#if CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE
215+
#if CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE
216216
#define WIFI_STA_DISCONNECTED_PM_ENABLED true
217217
#else
218218
#define WIFI_STA_DISCONNECTED_PM_ENABLED false
219219
#endif
220220

221-
#if CONFIG_ESP_WIFI_ENABLE_WPA3_SAE
221+
#if CONFIG_WIFI_RMT_ENABLE_WPA3_SAE
222222
#define WIFI_ENABLE_WPA3_SAE (1<<0)
223223
#else
224224
#define WIFI_ENABLE_WPA3_SAE 0
@@ -230,50 +230,50 @@ extern wifi_osi_funcs_t g_wifi_osi_funcs;
230230
#define WIFI_ENABLE_CACHE_TX_BUFFER 0
231231
#endif
232232

233-
#if CONFIG_ESP_WIFI_FTM_INITIATOR_SUPPORT
233+
#if CONFIG_WIFI_RMT_FTM_INITIATOR_SUPPORT
234234
#define WIFI_FTM_INITIATOR (1<<2)
235235
#else
236236
#define WIFI_FTM_INITIATOR 0
237237
#endif
238238

239-
#if CONFIG_ESP_WIFI_FTM_RESPONDER_SUPPORT
239+
#if CONFIG_WIFI_RMT_FTM_RESPONDER_SUPPORT
240240
#define WIFI_FTM_RESPONDER (1<<3)
241241
#else
242242
#define WIFI_FTM_RESPONDER 0
243243
#endif
244244

245-
#if CONFIG_ESP_WIFI_GCMP_SUPPORT
245+
#if CONFIG_WIFI_RMT_GCMP_SUPPORT
246246
#define WIFI_ENABLE_GCMP (1<<4)
247247
#else
248248
#define WIFI_ENABLE_GCMP 0
249249
#endif
250250

251-
#if CONFIG_ESP_WIFI_GMAC_SUPPORT
251+
#if CONFIG_WIFI_RMT_GMAC_SUPPORT
252252
#define WIFI_ENABLE_GMAC (1<<5)
253253
#else
254254
#define WIFI_ENABLE_GMAC 0
255255
#endif
256256

257-
#if CONFIG_ESP_WIFI_11R_SUPPORT
257+
#if CONFIG_WIFI_RMT_11R_SUPPORT
258258
#define WIFI_ENABLE_11R (1<<6)
259259
#else
260260
#define WIFI_ENABLE_11R 0
261261
#endif
262262

263-
#if CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT
263+
#if CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT
264264
#define WIFI_ENABLE_ENTERPRISE (1<<7)
265265
#else
266266
#define WIFI_ENABLE_ENTERPRISE 0
267267
#endif
268268

269-
#if CONFIG_ESP_WIFI_ENABLE_DUMP_HESIGB && !WIFI_CSI_ENABLED
269+
#if CONFIG_WIFI_RMT_ENABLE_DUMP_HESIGB && !WIFI_CSI_ENABLED
270270
#define WIFI_DUMP_HESIGB_ENABLED true
271271
#else
272272
#define WIFI_DUMP_HESIGB_ENABLED false
273273
#endif
274274

275-
#if CONFIG_ESP_WIFI_TX_HETB_QUEUE_NUM
276-
#define WIFI_TX_HETB_QUEUE_NUM CONFIG_ESP_WIFI_TX_HETB_QUEUE_NUM
275+
#if CONFIG_WIFI_RMT_TX_HETB_QUEUE_NUM
276+
#define WIFI_TX_HETB_QUEUE_NUM CONFIG_WIFI_RMT_TX_HETB_QUEUE_NUM
277277
#else
278278
#define WIFI_TX_HETB_QUEUE_NUM 1
279279
#endif
@@ -300,12 +300,12 @@ extern wifi_osi_funcs_t g_wifi_osi_funcs;
300300
#define WIFI_INIT_CONFIG_DEFAULT() { \
301301
.osi_funcs = &g_wifi_osi_funcs, \
302302
.wpa_crypto_funcs = g_wifi_default_wpa_crypto_funcs, \
303-
.static_rx_buf_num = CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM,\
304-
.dynamic_rx_buf_num = CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM,\
305-
.tx_buf_type = CONFIG_ESP_WIFI_TX_BUFFER_TYPE,\
303+
.static_rx_buf_num = CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM,\
304+
.dynamic_rx_buf_num = CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM,\
305+
.tx_buf_type = CONFIG_WIFI_RMT_TX_BUFFER_TYPE,\
306306
.static_tx_buf_num = WIFI_STATIC_TX_BUFFER_NUM,\
307307
.dynamic_tx_buf_num = WIFI_DYNAMIC_TX_BUFFER_NUM,\
308-
.rx_mgmt_buf_type = CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF,\
308+
.rx_mgmt_buf_type = CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF,\
309309
.rx_mgmt_buf_num = WIFI_RX_MGMT_BUF_NUM_DEF,\
310310
.cache_tx_buf_num = WIFI_CACHE_TX_BUFFER_NUM,\
311311
.csi_enable = WIFI_CSI_ENABLED,\
@@ -320,7 +320,7 @@ extern wifi_osi_funcs_t g_wifi_osi_funcs;
320320
.mgmt_sbuf_num = WIFI_MGMT_SBUF_NUM, \
321321
.feature_caps = WIFI_FEATURE_CAPS, \
322322
.sta_disconnected_pm = WIFI_STA_DISCONNECTED_PM_ENABLED, \
323-
.espnow_max_encrypt_num = CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM, \
323+
.espnow_max_encrypt_num = CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM, \
324324
.tx_hetb_queue_num = WIFI_TX_HETB_QUEUE_NUM, \
325325
.dump_hesigb_enable = WIFI_DUMP_HESIGB_ENABLED, \
326326
.magic = WIFI_INIT_CONFIG_MAGIC\
@@ -676,8 +676,8 @@ esp_err_t esp_wifi_get_ps(wifi_ps_type_t *type);
676676
/**
677677
* @brief Set protocol type of specified interface
678678
* The default protocol is (WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G|WIFI_PROTOCOL_11N).
679-
* if CONFIG_SOC_WIFI_HE_SUPPORT and band mode is 2.4G, the default protocol is (WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G|WIFI_PROTOCOL_11N|WIFI_PROTOCOL_11AX).
680-
* if CONFIG_SOC_WIFI_SUPPORT_5G and band mode is 5G, the default protocol is (WIFI_PROTOCOL_11A|WIFI_PROTOCOL_11N|WIFI_PROTOCOL_11AC|WIFI_PROTOCOL_11AX).
679+
* if CONFIG_SLAVE_SOC_WIFI_HE_SUPPORT and band mode is 2.4G, the default protocol is (WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G|WIFI_PROTOCOL_11N|WIFI_PROTOCOL_11AX).
680+
* if CONFIG_SLAVE_SOC_WIFI_SUPPORT_5G and band mode is 5G, the default protocol is (WIFI_PROTOCOL_11A|WIFI_PROTOCOL_11N|WIFI_PROTOCOL_11AC|WIFI_PROTOCOL_11AX).
681681
*
682682
* @attention 1. When WiFi band mode is 2.4G only, support 802.11b or 802.11bg or 802.11bgn or 802.11bgnax or LR mode
683683
* @attention 2. When WiFi band mode is 5G only, support 802.11a or 802.11an or 802.11anac or 802.11anacax
@@ -1669,8 +1669,8 @@ esp_err_t esp_wifi_get_band(wifi_band_t* band);
16691669
* @attention 1. When the WiFi band mode is set to 2.4G only, it operates exclusively on the 2.4GHz channels.
16701670
* @attention 2. When the WiFi band mode is set to 5G only, it operates exclusively on the 5GHz channels.
16711671
* @attention 3. When the WiFi band mode is set to 2.4G + 5G (WIFI_BAND_MODE_AUTO), it can operate on both the 2.4GHz and 5GHz channels.
1672-
* @attention 4. WiFi band mode can be set to 5G only or 2.4G + 5G (WIFI_BAND_MODE_AUTO) if CONFIG_SOC_WIFI_SUPPORT_5G is supported.
1673-
* @attention 5. If CONFIG_SOC_WIFI_SUPPORT_5G is not supported, the API will return ESP_ERR_INVALID_ARG when the band mode is set to either 5G only or 2.4G + 5G (WIFI_BAND_MODE_AUTO).
1672+
* @attention 4. WiFi band mode can be set to 5G only or 2.4G + 5G (WIFI_BAND_MODE_AUTO) if CONFIG_SLAVE_SOC_WIFI_SUPPORT_5G is supported.
1673+
* @attention 5. If CONFIG_SLAVE_SOC_WIFI_SUPPORT_5G is not supported, the API will return ESP_ERR_INVALID_ARG when the band mode is set to either 5G only or 2.4G + 5G (WIFI_BAND_MODE_AUTO).
16741674
* @attention 6. When a WiFi band mode change triggers a band change, if no channel is set for the current band, a default channel will be assigned: channel 1 for 2.4G band and channel 36 for 5G band.
16751675
*
16761676
* @param[in] band_mode store the band mode of WiFi
@@ -1733,7 +1733,7 @@ esp_err_t esp_wifi_set_protocols(wifi_interface_t ifx, wifi_protocols_t *protoco
17331733
/**
17341734
* @brief Get the current protocol of the specified interface and specified band
17351735
*
1736-
* @attention 1. The 5G protocol can only be read when CONFIG_SOC_WIFI_SUPPORT_5G is enabled.
1736+
* @attention 1. The 5G protocol can only be read when CONFIG_SLAVE_SOC_WIFI_SUPPORT_5G is enabled.
17371737
* @attention 2. When the WiFi band mode is set to 2.4G only, it will not get 5G protocol
17381738
* @attention 3. When the WiFi band mode is set to 5G only, it will not get 2.4G protocol
17391739
*
@@ -1772,7 +1772,7 @@ esp_err_t esp_wifi_set_bandwidths(wifi_interface_t ifx, wifi_bandwidths_t* bw);
17721772
/**
17731773
* @brief Get the bandwidth of specified interface and specified band
17741774
*
1775-
* @attention 1. The 5G bandwidth can only be read when CONFIG_SOC_WIFI_SUPPORT_5G is enabled.
1775+
* @attention 1. The 5G bandwidth can only be read when CONFIG_SLAVE_SOC_WIFI_SUPPORT_5G is enabled.
17761776
* @attention 2. When the WiFi band mode is set to 2.4G only, it will not get 5G bandwidth
17771777
* @attention 3. When the WiFi band mode is set to 5G only, it will not get 2.4G bandwidth
17781778
*

components/esp_wifi_remote/idf_v5.5/include/injected/esp_wifi_he_types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ enum {
4141
/**
4242
* @brief Channel state information(CSI) configuration type
4343
*/
44-
#if CONFIG_SOC_WIFI_MAC_VERSION_NUM == 3
44+
#if CONFIG_SLAVE_SOC_WIFI_MAC_VERSION_NUM == 3
4545
typedef struct {
4646
uint32_t enable : 1; /**< enable to acquire CSI */
4747
uint32_t acquire_csi_legacy : 1; /**< enable to acquire L-LTF */
@@ -172,7 +172,7 @@ typedef enum {
172172
/**
173173
* @brief RxControl Info
174174
*/
175-
#if CONFIG_SOC_WIFI_MAC_VERSION_NUM == 3
175+
#if CONFIG_SLAVE_SOC_WIFI_MAC_VERSION_NUM == 3
176176
typedef struct {
177177
signed rssi: 8; /**< the RSSI of the reception frame */
178178
unsigned rate: 5; /**< if cur_bb_format is RX_BB_FORMAT_11B, it's the transmission rate. otherwise it's Rate field of L-SIG */

components/esp_wifi_remote/idf_v5.5/include/injected/esp_wifi_types_generic.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ typedef enum {
3535
typedef enum {
3636
WIFI_IF_STA = ESP_IF_WIFI_STA, /**< Station interface */
3737
WIFI_IF_AP = ESP_IF_WIFI_AP, /**< Soft-AP interface */
38-
#if CONFIG_SOC_WIFI_NAN_SUPPORT || !CONFIG_SOC_WIFI_ENABLED
38+
#if CONFIG_SLAVE_SOC_WIFI_NAN_SUPPORT || !CONFIG_SLAVE_SOC_WIFI_ENABLED
3939
WIFI_IF_NAN = ESP_IF_WIFI_NAN, /**< NAN interface */
4040
#endif
4141
WIFI_IF_MAX /**< Maximum number of interfaces */
@@ -64,7 +64,7 @@ typedef struct {
6464
uint8_t nchan; /**< Total channel number of the allowed 2.4GHz Wi-Fi channels */
6565
int8_t max_tx_power; /**< This field is used for getting Wi-Fi maximum transmitting power, call esp_wifi_set_max_tx_power to set the maximum transmitting power. */
6666
wifi_country_policy_t policy; /**< Country policy */
67-
#if CONFIG_SOC_WIFI_SUPPORT_5G
67+
#if CONFIG_SLAVE_SOC_WIFI_SUPPORT_5G
6868
uint32_t wifi_5g_channel_mask; /**< A bitmask representing the allowed 5GHz Wi-Fi channels.
6969
Each bit in the mask corresponds to a specific channel as wifi_5g_channel_bit_t shown.
7070
Bitmask set to 0 indicates 5GHz channels are allowed according to local regulatory rules.
@@ -936,7 +936,7 @@ typedef enum {
936936
WIFI_PHY_RATE_MCS5_LGI = 0x15, /**< MCS5 with long GI */
937937
WIFI_PHY_RATE_MCS6_LGI = 0x16, /**< MCS6 with long GI */
938938
WIFI_PHY_RATE_MCS7_LGI = 0x17, /**< MCS7 with long GI */
939-
#if CONFIG_SOC_WIFI_HE_SUPPORT || !CONFIG_SOC_WIFI_SUPPORTED
939+
#if CONFIG_SLAVE_SOC_WIFI_HE_SUPPORT || !CONFIG_SLAVE_SOC_WIFI_SUPPORTED
940940
WIFI_PHY_RATE_MCS8_LGI, /**< MCS8 with long GI */
941941
WIFI_PHY_RATE_MCS9_LGI, /**< MCS9 with long GI */
942942
#endif
@@ -949,7 +949,7 @@ typedef enum {
949949
WIFI_PHY_RATE_MCS5_SGI, /**< MCS5 with short GI */
950950
WIFI_PHY_RATE_MCS6_SGI, /**< MCS6 with short GI */
951951
WIFI_PHY_RATE_MCS7_SGI, /**< MCS7 with short GI */
952-
#if CONFIG_SOC_WIFI_HE_SUPPORT || !CONFIG_SOC_WIFI_SUPPORTED
952+
#if CONFIG_SLAVE_SOC_WIFI_HE_SUPPORT || !CONFIG_SLAVE_SOC_WIFI_SUPPORTED
953953
WIFI_PHY_RATE_MCS8_SGI, /**< MCS8 with short GI */
954954
WIFI_PHY_RATE_MCS9_SGI, /**< MCS9 with short GI */
955955
#endif

components/esp_wifi_remote/scripts/generate_and_check.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -332,30 +332,30 @@ def generate_wifi_native(idf_path, idf_ver_dir, component_path):
332332
injected_wifi_h = os.path.join(component_path, idf_ver_dir, 'include', 'injected', 'esp_wifi.h')
333333
original_wifi_h = os.path.join(idf_path, 'components', 'esp_wifi', 'include', 'esp_wifi.h')
334334
content = open(original_wifi_h, 'r').read()
335-
# content = content.replace(r'CONFIG_ESP_WIFI_','CONFIG_WIFI_RMT_')
336-
# content = content.replace(r'CONFIG_SOC_WIFI_','CONFIG_SLAVE_SOC_WIFI_')
337-
# content = content.replace(r'CONFIG_FREERTOS_','CONFIG_SLAVE_FREERTOS_')
338-
# content = content.replace(r'CONFIG_IDF_TARGET_','CONFIG_SLAVE_IDF_TARGET_')
335+
content = content.replace(r'CONFIG_ESP_WIFI_','CONFIG_WIFI_RMT_')
336+
content = content.replace(r'CONFIG_SOC_WIFI_','CONFIG_SLAVE_SOC_WIFI_')
337+
content = content.replace(r'CONFIG_FREERTOS_','CONFIG_SLAVE_FREERTOS_')
338+
content = content.replace(r'CONFIG_IDF_TARGET_','CONFIG_SLAVE_IDF_TARGET_')
339339
open(injected_wifi_h, 'w').write(content)
340340
native_headers.append(injected_wifi_h)
341341

342342
injected_wifi_generic_types = os.path.join(component_path, idf_ver_dir, 'include', 'injected', 'esp_wifi_types_generic.h')
343343
original_wifi_generic_types = os.path.join(idf_path, 'components', 'esp_wifi', 'include', 'esp_wifi_types_generic.h')
344344
content = open(original_wifi_generic_types, 'r').read()
345-
# content = content.replace(r'CONFIG_ESP_WIFI_','CONFIG_WIFI_RMT_')
346-
# content = content.replace(r'CONFIG_SOC_WIFI_','CONFIG_SLAVE_SOC_WIFI_')
347-
# content = content.replace(r'CONFIG_FREERTOS_','CONFIG_SLAVE_FREERTOS_')
348-
# content = content.replace(r'CONFIG_IDF_TARGET_','CONFIG_SLAVE_IDF_TARGET_')
345+
content = content.replace(r'CONFIG_ESP_WIFI_','CONFIG_WIFI_RMT_')
346+
content = content.replace(r'CONFIG_SOC_WIFI_','CONFIG_SLAVE_SOC_WIFI_')
347+
content = content.replace(r'CONFIG_FREERTOS_','CONFIG_SLAVE_FREERTOS_')
348+
content = content.replace(r'CONFIG_IDF_TARGET_','CONFIG_SLAVE_IDF_TARGET_')
349349
open(injected_wifi_generic_types, 'w').write(content)
350350
native_headers.append(injected_wifi_generic_types)
351351

352352
injected_wifi_he_types = os.path.join(component_path, idf_ver_dir, 'include', 'injected', 'esp_wifi_he_types.h')
353353
original_wifi_he_types = os.path.join(idf_path, 'components', 'esp_wifi', 'include', 'esp_wifi_he_types.h')
354354
content = open(original_wifi_he_types, 'r').read()
355-
# content = content.replace(r'CONFIG_ESP_WIFI_','CONFIG_WIFI_RMT_')
356-
# content = content.replace(r'CONFIG_SOC_WIFI_','CONFIG_SLAVE_SOC_WIFI_')
357-
# content = content.replace(r'CONFIG_FREERTOS_','CONFIG_SLAVE_FREERTOS_')
358-
# content = content.replace(r'CONFIG_IDF_TARGET_','CONFIG_SLAVE_IDF_TARGET_')
355+
content = content.replace(r'CONFIG_ESP_WIFI_','CONFIG_WIFI_RMT_')
356+
content = content.replace(r'CONFIG_SOC_WIFI_','CONFIG_SLAVE_SOC_WIFI_')
357+
content = content.replace(r'CONFIG_FREERTOS_','CONFIG_SLAVE_FREERTOS_')
358+
content = content.replace(r'CONFIG_IDF_TARGET_','CONFIG_SLAVE_IDF_TARGET_')
359359
open(injected_wifi_he_types, 'w').write(content)
360360
native_headers.append(injected_wifi_he_types)
361361
return native_headers

0 commit comments

Comments
 (0)