diff --git a/.github/workflows/wifi_remote__build.yml b/.github/workflows/wifi_remote__build.yml new file mode 100644 index 00000000000..db7baf08f16 --- /dev/null +++ b/.github/workflows/wifi_remote__build.yml @@ -0,0 +1,47 @@ +name: "esp_wifi_remote: build-tests" + +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize, reopened, labeled] + +jobs: + wifi_remote_api_compat: + if: contains(github.event.pull_request.labels.*.name, 'wifi_remote') || github.event_name == 'push' + name: Check API compatibility of WiFi Remote + strategy: + matrix: + idf_ver: ["latest"] + runs-on: ubuntu-20.04 + container: espressif/idf:${{ matrix.idf_ver }} + steps: + - name: Checkout esp-protocols + uses: actions/checkout@v3 + - name: Check that headers are the same as generated + shell: bash + run: | + . ${IDF_PATH}/export.sh + cd ./components/esp_wifi_remote/scripts + python parse_header.py + ./check_headers.sh + + build_wifi_remote: + if: contains(github.event.pull_request.labels.*.name, 'wifi_remote') || github.event_name == 'push' + name: Build WiFi Remote + strategy: + matrix: + idf_ver: ["latest"] + test: [ { app: smoke_test, path: "test/smoke_test" }] + runs-on: ubuntu-20.04 + container: espressif/idf:${{ matrix.idf_ver }} + steps: + - name: Checkout esp-protocols + uses: actions/checkout@v3 + - name: Build ${{ matrix.test.app }} with IDF-${{ matrix.idf_ver }} + shell: bash + run: | + ${IDF_PATH}/install.sh --enable-pytest + . ${IDF_PATH}/export.sh + python ./ci/build_apps.py ./components/esp_wifi_remote/${{matrix.test.path}} -vv --preserve-all diff --git a/components/esp_wifi_remote/CMakeLists.txt b/components/esp_wifi_remote/CMakeLists.txt index 7d94483db56..acbef7984f1 100644 --- a/components/esp_wifi_remote/CMakeLists.txt +++ b/components/esp_wifi_remote/CMakeLists.txt @@ -1,5 +1,5 @@ if(NOT CONFIG_ESP_WIFI_ENABLED) - set(src_wifi_is_remote esp_wifi_remote.c) + set(src_wifi_is_remote esp_wifi_remote.c esp_wifi_with_remote.c) endif() idf_component_register(INCLUDE_DIRS include diff --git a/components/esp_wifi_remote/esp_wifi_remote.c b/components/esp_wifi_remote/esp_wifi_remote.c index 7b9fb315100..e5764471a88 100644 --- a/components/esp_wifi_remote/esp_wifi_remote.c +++ b/components/esp_wifi_remote/esp_wifi_remote.c @@ -29,6 +29,7 @@ WEAK uint64_t g_wifi_feature_caps = #endif 0; +#if 0 WEAK esp_err_t esp_wifi_connect(void) { return remote_esp_wifi_connect(); @@ -213,3 +214,4 @@ WEAK esp_err_t esp_wifi_get_protocol(wifi_interface_t ifx, uint8_t *protocol_bit { return remote_esp_wifi_get_protocol(ifx, protocol_bitmap); } +#endif diff --git a/components/esp_wifi_remote/include/esp_wifi_remote_api.h b/components/esp_wifi_remote/include/esp_wifi_remote_api.h index 5fe8806b9c5..d39fea26115 100644 --- a/components/esp_wifi_remote/include/esp_wifi_remote_api.h +++ b/components/esp_wifi_remote/include/esp_wifi_remote_api.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/esp_wifi_remote/scripts/check_headers.sh b/components/esp_wifi_remote/scripts/check_headers.sh new file mode 100755 index 00000000000..23b1f79144d --- /dev/null +++ b/components/esp_wifi_remote/scripts/check_headers.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -e + +check_files=" + include/esp_wifi_remote_api.h + include/esp_wifi_remote_with_hosted.h + esp_wifi_with_remote.c + test/smoke_test/components/esp_hosted/esp_hosted_mock.c + test/smoke_test/components/esp_hosted/include/esp_hosted_mock.h + test/smoke_test/main/all_wifi_calls.c + test/smoke_test/main/all_wifi_remote_calls.c + " + +for i in $check_files; do + generated_header="${i##*/}" + current_header="../$i" + echo "Checking $current_header" + diff -I 'FileCopyrightText' $generated_header $current_header +done; diff --git a/components/esp_wifi_remote/scripts/parse_header.py b/components/esp_wifi_remote/scripts/parse_header.py index b45dfa32b6a..58045d7e5c1 100644 --- a/components/esp_wifi_remote/scripts/parse_header.py +++ b/components/esp_wifi_remote/scripts/parse_header.py @@ -62,44 +62,6 @@ def extract_function_prototypes(header_code, header): visitor.visit(ast) return visitor.function_prototypes -# def preprocess_header(header_file): -# with open(header_file, 'r') as file: - -# # Parse the preprocessed header file and extract function prototypes -# def extract_function_prototypes(header_code): - - -# Generate test cases for each function -def generate_test_cases(): - test_cases = {} - for func_name, args in function_prototypes.items(): - test_args = [] - for arg_info in args: - if isinstance(arg_info, c_ast.TypeDecl): - print(arg_info.type.names[0]) - arg_name = arg_info.declname - arg_type = 'int' # Default to int type if type is missing - else: - arg_name, arg_type = arg_info - test_args.append((arg_name, generate_test_argument(arg_type))) - test_cases[func_name] = test_args - return test_cases - - -# Generate test argument based on type -def generate_test_argument(arg_type): - if isinstance(arg_type, c_ast.TypeDecl): - return generate_test_argument(arg_type.type) - elif isinstance(arg_type, c_ast.PtrDecl): - return None # Placeholder for pointer argument handling - elif isinstance(arg_type, c_ast.IdentifierType): - if 'int' in arg_type.names: - return 1 # Example integer argument - elif 'float' in arg_type.names: - return 1.0 # Example float argument - # Add more cases as needed for other data types - return None # Unknown type - def generate_forwarding_c_file(prefix): with open('forwarding.c', 'w') as file: @@ -129,6 +91,7 @@ def exec_cmd(what, out_file): def preprocess(idf_path, header): project_dir = os.path.join(idf_path, 'examples', 'get-started', 'blink') build_dir = os.path.join(project_dir, 'build') + subprocess.check_call(['idf.py', '-B', build_dir, 'reconfigure'], cwd=project_dir) build_commands_json = os.path.join(build_dir, 'compile_commands.json') with open(build_commands_json, 'r', encoding='utf-8') as f: build_command = json.load(f)[0]['command'].split() @@ -180,21 +143,47 @@ def get_args(parameters): return comma_separated_params, comma_separated_names +def get_vars(parameters): + definitions = '' + names = [] + for param in parameters: + typename = param.type + if typename == 'void' and param.ptr == 0 and param.name is None: + continue + default_value = '0' + declname = param.name + names.append(f'{declname}') + if param.qual != '': + typename = f'{param.qual} ' + typename + if param.ptr > 0: + declname = '*' * param.ptr + declname + default_value = 'NULL' + if param.array > 0: + declname += f'[{param.array}]' + default_value = '{}' + definitions += f' {typename} {declname} = {default_value};\n' + comma_separated_names = ', '.join(names) + return definitions, comma_separated_names + + if __name__ == '__main__': idf_path = os.getenv('IDF_PATH') if idf_path is None: raise RuntimeError("Environment variable 'IDF_PATH' wasn't set.") header = os.path.join(idf_path, 'components', 'esp_wifi', 'include', 'esp_wifi.h') function_prototypes = extract_function_prototypes(preprocess(idf_path, header), header) + copyright_header = open('copyright_header.h', 'r').read() namespace = re.compile(r'^esp_wifi') with open('esp_wifi_remote_api.h', 'w') as f: + f.write(copyright_header) for func_name, args in function_prototypes.items(): params, _ = get_args(args[1]) remote_func_name = namespace.sub('esp_wifi_remote', func_name) f.write(f'{args[0]} {remote_func_name}({params});\n') - with open('esp_wifi_to_remote.c', 'w') as f: + with open('esp_wifi_with_remote.c', 'w') as f: + f.write(copyright_header) f.write('#include "esp_wifi.h"\n') f.write('#include "esp_wifi_remote.h"\n\n') for func_name, args in function_prototypes.items(): @@ -207,9 +196,11 @@ def get_args(parameters): with open('esp_hosted_mock.c', 'w') as f: with open('esp_hosted_mock.h', 'w') as h: + f.write(copyright_header) + h.write(copyright_header) h.write('\n') f.write('#include "esp_wifi.h"\n') - f.write('#include "esp_wifi_remote.h"\n\n') + f.write('#include "esp_wifi_remote.h"\n') for func_name, args in function_prototypes.items(): hosted_func_name = namespace.sub('esp_hosted_wifi', func_name) params, names = get_args(args[1]) @@ -217,20 +208,44 @@ def get_args(parameters): ret_value = '0' # default return value if (ret_type == 'esp_err_t'): ret_value = 'ESP_OK' - f.write(f'{ret_type} {hosted_func_name}({params})\n') + f.write(f'\n{ret_type} {hosted_func_name}({params})\n') f.write('{\n') f.write(f' return {ret_value};\n') - f.write('}\n\n') + f.write('}\n') h.write(f'{ret_type} {hosted_func_name}({params});\n') with open('esp_wifi_remote_with_hosted.h', 'w') as f: - f.write('#include "esp_hosted_wifi_api.h"\n\n') + f.write(copyright_header) + f.write('#include "esp_hosted_wifi_api.h"\n') for func_name, args in function_prototypes.items(): remote_func_name = namespace.sub('esp_wifi_remote', func_name) hosted_func_name = namespace.sub('esp_hosted_wifi', func_name) params, names = get_args(args[1]) - f.write(f'static inline {args[0]} {remote_func_name}({params})\n') + f.write(f'\nstatic inline {args[0]} {remote_func_name}({params})\n') f.write('{\n') f.write(f' return {hosted_func_name}({names});\n') - f.write('}\n\n') + f.write('}\n') + + with open('all_wifi_calls.c', 'w') as wifi: + with open('all_wifi_remote_calls.c', 'w') as remote: + wifi.write(copyright_header) + remote.write(copyright_header) + wifi.write('#include "esp_wifi.h"\n\n') + remote.write('#include "esp_wifi_remote.h"\n\n') + wifi.write('void run_all_wifi_apis(void)\n{\n') + remote.write('void run_all_wifi_remote_apis(void)\n{\n') + for func_name, args in function_prototypes.items(): + remote_func_name = namespace.sub('esp_wifi_remote', func_name) + + defs, names = get_vars(args[1]) + wifi.write(' {\n') + wifi.write(f'{defs}') + wifi.write(f' {func_name}({names});\n') + wifi.write(' }\n\n') + remote.write(' {\n') + remote.write(f'{defs}') + remote.write(f' {remote_func_name}({names});\n') + remote.write(' }\n\n') + wifi.write('}\n') + remote.write('}\n') diff --git a/components/esp_wifi_remote/test/smoke_test/components/esp_hosted/esp_hosted_mock.c b/components/esp_wifi_remote/test/smoke_test/components/esp_hosted/esp_hosted_mock.c index 10ae106ba2c..361ac8a88df 100644 --- a/components/esp_wifi_remote/test/smoke_test/components/esp_hosted/esp_hosted_mock.c +++ b/components/esp_wifi_remote/test/smoke_test/components/esp_hosted/esp_hosted_mock.c @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Unlicense OR CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #include "esp_wifi.h" #include "esp_wifi_remote.h" diff --git a/components/esp_wifi_remote/test/smoke_test/components/esp_hosted/include/esp_hosted_mock.h b/components/esp_wifi_remote/test/smoke_test/components/esp_hosted/include/esp_hosted_mock.h index 343b3d9cd4d..ba6ece408b1 100644 --- a/components/esp_wifi_remote/test/smoke_test/components/esp_hosted/include/esp_hosted_mock.h +++ b/components/esp_wifi_remote/test/smoke_test/components/esp_hosted/include/esp_hosted_mock.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Unlicense OR CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ esp_err_t esp_hosted_wifi_init(const wifi_init_config_t *config); diff --git a/components/esp_wifi_remote/test/smoke_test/main/CMakeLists.txt b/components/esp_wifi_remote/test/smoke_test/main/CMakeLists.txt index 6f782aafcc3..00a81f853be 100644 --- a/components/esp_wifi_remote/test/smoke_test/main/CMakeLists.txt +++ b/components/esp_wifi_remote/test/smoke_test/main/CMakeLists.txt @@ -1,2 +1,2 @@ -idf_component_register(SRCS "smoke_test.c" +idf_component_register(SRCS "smoke_test.c" "all_wifi_calls.c" "all_wifi_remote_calls.c" INCLUDE_DIRS ".") diff --git a/components/esp_wifi_remote/test/smoke_test/main/all_wifi_calls.c b/components/esp_wifi_remote/test/smoke_test/main/all_wifi_calls.c new file mode 100644 index 00000000000..87d5e276fed --- /dev/null +++ b/components/esp_wifi_remote/test/smoke_test/main/all_wifi_calls.c @@ -0,0 +1,404 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ +#include "esp_wifi.h" + +void run_all_wifi_apis(void) +{ + { + const wifi_init_config_t *config = NULL; + esp_wifi_init(config); + } + + { + esp_wifi_deinit(); + } + + { + wifi_mode_t mode = 0; + esp_wifi_set_mode(mode); + } + + { + wifi_mode_t *mode = NULL; + esp_wifi_get_mode(mode); + } + + { + esp_wifi_start(); + } + + { + esp_wifi_stop(); + } + + { + esp_wifi_restore(); + } + + { + esp_wifi_connect(); + } + + { + esp_wifi_disconnect(); + } + + { + esp_wifi_clear_fast_connect(); + } + + { + uint16_t aid = 0; + esp_wifi_deauth_sta(aid); + } + + { + const wifi_scan_config_t *config = NULL; + _Bool block = 0; + esp_wifi_scan_start(config, block); + } + + { + esp_wifi_scan_stop(); + } + + { + uint16_t *number = NULL; + esp_wifi_scan_get_ap_num(number); + } + + { + uint16_t *number = NULL; + wifi_ap_record_t *ap_records = NULL; + esp_wifi_scan_get_ap_records(number, ap_records); + } + + { + wifi_ap_record_t *ap_record = NULL; + esp_wifi_scan_get_ap_record(ap_record); + } + + { + esp_wifi_clear_ap_list(); + } + + { + wifi_ap_record_t *ap_info = NULL; + esp_wifi_sta_get_ap_info(ap_info); + } + + { + wifi_ps_type_t type = 0; + esp_wifi_set_ps(type); + } + + { + wifi_ps_type_t *type = NULL; + esp_wifi_get_ps(type); + } + + { + wifi_interface_t ifx = 0; + uint8_t protocol_bitmap = 0; + esp_wifi_set_protocol(ifx, protocol_bitmap); + } + + { + wifi_interface_t ifx = 0; + uint8_t *protocol_bitmap = NULL; + esp_wifi_get_protocol(ifx, protocol_bitmap); + } + + { + wifi_interface_t ifx = 0; + wifi_bandwidth_t bw = 0; + esp_wifi_set_bandwidth(ifx, bw); + } + + { + wifi_interface_t ifx = 0; + wifi_bandwidth_t *bw = NULL; + esp_wifi_get_bandwidth(ifx, bw); + } + + { + uint8_t primary = 0; + wifi_second_chan_t second = 0; + esp_wifi_set_channel(primary, second); + } + + { + uint8_t *primary = NULL; + wifi_second_chan_t *second = NULL; + esp_wifi_get_channel(primary, second); + } + + { + const wifi_country_t *country = NULL; + esp_wifi_set_country(country); + } + + { + wifi_country_t *country = NULL; + esp_wifi_get_country(country); + } + + { + wifi_interface_t ifx = 0; + const uint8_t mac[6] = {}; + esp_wifi_set_mac(ifx, mac); + } + + { + wifi_interface_t ifx = 0; + uint8_t mac[6] = {}; + esp_wifi_get_mac(ifx, mac); + } + + { + wifi_promiscuous_cb_t cb = 0; + esp_wifi_set_promiscuous_rx_cb(cb); + } + + { + _Bool en = 0; + esp_wifi_set_promiscuous(en); + } + + { + _Bool *en = NULL; + esp_wifi_get_promiscuous(en); + } + + { + const wifi_promiscuous_filter_t *filter = NULL; + esp_wifi_set_promiscuous_filter(filter); + } + + { + wifi_promiscuous_filter_t *filter = NULL; + esp_wifi_get_promiscuous_filter(filter); + } + + { + const wifi_promiscuous_filter_t *filter = NULL; + esp_wifi_set_promiscuous_ctrl_filter(filter); + } + + { + wifi_promiscuous_filter_t *filter = NULL; + esp_wifi_get_promiscuous_ctrl_filter(filter); + } + + { + wifi_interface_t interface = 0; + wifi_config_t *conf = NULL; + esp_wifi_set_config(interface, conf); + } + + { + wifi_interface_t interface = 0; + wifi_config_t *conf = NULL; + esp_wifi_get_config(interface, conf); + } + + { + wifi_sta_list_t *sta = NULL; + esp_wifi_ap_get_sta_list(sta); + } + + { + const uint8_t mac[6] = {}; + uint16_t *aid = NULL; + esp_wifi_ap_get_sta_aid(mac, aid); + } + + { + wifi_storage_t storage = 0; + esp_wifi_set_storage(storage); + } + + { + _Bool enable = 0; + wifi_vendor_ie_type_t type = 0; + wifi_vendor_ie_id_t idx = 0; + const void *vnd_ie = NULL; + esp_wifi_set_vendor_ie(enable, type, idx, vnd_ie); + } + + { + esp_vendor_ie_cb_t cb = 0; + void *ctx = NULL; + esp_wifi_set_vendor_ie_cb(cb, ctx); + } + + { + int8_t power = 0; + esp_wifi_set_max_tx_power(power); + } + + { + int8_t *power = NULL; + esp_wifi_get_max_tx_power(power); + } + + { + uint32_t mask = 0; + esp_wifi_set_event_mask(mask); + } + + { + uint32_t *mask = NULL; + esp_wifi_get_event_mask(mask); + } + + { + wifi_interface_t ifx = 0; + const void *buffer = NULL; + int len = 0; + _Bool en_sys_seq = 0; + esp_wifi_80211_tx(ifx, buffer, len, en_sys_seq); + } + + { + wifi_csi_cb_t cb = 0; + void *ctx = NULL; + esp_wifi_set_csi_rx_cb(cb, ctx); + } + + { + const wifi_csi_config_t *config = NULL; + esp_wifi_set_csi_config(config); + } + + { + _Bool en = 0; + esp_wifi_set_csi(en); + } + + { + const wifi_ant_gpio_config_t *config = NULL; + esp_wifi_set_ant_gpio(config); + } + + { + wifi_ant_gpio_config_t *config = NULL; + esp_wifi_get_ant_gpio(config); + } + + { + const wifi_ant_config_t *config = NULL; + esp_wifi_set_ant(config); + } + + { + wifi_ant_config_t *config = NULL; + esp_wifi_get_ant(config); + } + + { + wifi_interface_t interface = 0; + esp_wifi_get_tsf_time(interface); + } + + { + wifi_interface_t ifx = 0; + uint16_t sec = 0; + esp_wifi_set_inactive_time(ifx, sec); + } + + { + wifi_interface_t ifx = 0; + uint16_t *sec = NULL; + esp_wifi_get_inactive_time(ifx, sec); + } + + { + uint32_t modules = 0; + esp_wifi_statis_dump(modules); + } + + { + int32_t rssi = 0; + esp_wifi_set_rssi_threshold(rssi); + } + + { + wifi_ftm_initiator_cfg_t *cfg = NULL; + esp_wifi_ftm_initiate_session(cfg); + } + + { + esp_wifi_ftm_end_session(); + } + + { + int16_t offset_cm = 0; + esp_wifi_ftm_resp_set_offset(offset_cm); + } + + { + wifi_interface_t ifx = 0; + _Bool disable = 0; + esp_wifi_config_11b_rate(ifx, disable); + } + + { + uint16_t wake_interval = 0; + esp_wifi_connectionless_module_set_wake_interval(wake_interval); + } + + { + esp_wifi_force_wakeup_acquire(); + } + + { + esp_wifi_force_wakeup_release(); + } + + { + const char *country = NULL; + _Bool ieee80211d_enabled = 0; + esp_wifi_set_country_code(country, ieee80211d_enabled); + } + + { + char *country = NULL; + esp_wifi_get_country_code(country); + } + + { + wifi_interface_t ifx = 0; + wifi_phy_rate_t rate = 0; + esp_wifi_config_80211_tx_rate(ifx, rate); + } + + { + wifi_interface_t ifx = 0; + esp_wifi_disable_pmf_config(ifx); + } + + { + uint16_t *aid = NULL; + esp_wifi_sta_get_aid(aid); + } + + { + wifi_phy_mode_t *phymode = NULL; + esp_wifi_sta_get_negotiated_phymode(phymode); + } + + { + _Bool enabled = 0; + esp_wifi_set_dynamic_cs(enabled); + } + + { + int *rssi = NULL; + esp_wifi_sta_get_rssi(rssi); + } + +} diff --git a/components/esp_wifi_remote/test/smoke_test/main/all_wifi_remote_calls.c b/components/esp_wifi_remote/test/smoke_test/main/all_wifi_remote_calls.c new file mode 100644 index 00000000000..b68904fb7c9 --- /dev/null +++ b/components/esp_wifi_remote/test/smoke_test/main/all_wifi_remote_calls.c @@ -0,0 +1,404 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ +#include "esp_wifi_remote.h" + +void run_all_wifi_remote_apis(void) +{ + { + const wifi_init_config_t *config = NULL; + esp_wifi_remote_init(config); + } + + { + esp_wifi_remote_deinit(); + } + + { + wifi_mode_t mode = 0; + esp_wifi_remote_set_mode(mode); + } + + { + wifi_mode_t *mode = NULL; + esp_wifi_remote_get_mode(mode); + } + + { + esp_wifi_remote_start(); + } + + { + esp_wifi_remote_stop(); + } + + { + esp_wifi_remote_restore(); + } + + { + esp_wifi_remote_connect(); + } + + { + esp_wifi_remote_disconnect(); + } + + { + esp_wifi_remote_clear_fast_connect(); + } + + { + uint16_t aid = 0; + esp_wifi_remote_deauth_sta(aid); + } + + { + const wifi_scan_config_t *config = NULL; + _Bool block = 0; + esp_wifi_remote_scan_start(config, block); + } + + { + esp_wifi_remote_scan_stop(); + } + + { + uint16_t *number = NULL; + esp_wifi_remote_scan_get_ap_num(number); + } + + { + uint16_t *number = NULL; + wifi_ap_record_t *ap_records = NULL; + esp_wifi_remote_scan_get_ap_records(number, ap_records); + } + + { + wifi_ap_record_t *ap_record = NULL; + esp_wifi_remote_scan_get_ap_record(ap_record); + } + + { + esp_wifi_remote_clear_ap_list(); + } + + { + wifi_ap_record_t *ap_info = NULL; + esp_wifi_remote_sta_get_ap_info(ap_info); + } + + { + wifi_ps_type_t type = 0; + esp_wifi_remote_set_ps(type); + } + + { + wifi_ps_type_t *type = NULL; + esp_wifi_remote_get_ps(type); + } + + { + wifi_interface_t ifx = 0; + uint8_t protocol_bitmap = 0; + esp_wifi_remote_set_protocol(ifx, protocol_bitmap); + } + + { + wifi_interface_t ifx = 0; + uint8_t *protocol_bitmap = NULL; + esp_wifi_remote_get_protocol(ifx, protocol_bitmap); + } + + { + wifi_interface_t ifx = 0; + wifi_bandwidth_t bw = 0; + esp_wifi_remote_set_bandwidth(ifx, bw); + } + + { + wifi_interface_t ifx = 0; + wifi_bandwidth_t *bw = NULL; + esp_wifi_remote_get_bandwidth(ifx, bw); + } + + { + uint8_t primary = 0; + wifi_second_chan_t second = 0; + esp_wifi_remote_set_channel(primary, second); + } + + { + uint8_t *primary = NULL; + wifi_second_chan_t *second = NULL; + esp_wifi_remote_get_channel(primary, second); + } + + { + const wifi_country_t *country = NULL; + esp_wifi_remote_set_country(country); + } + + { + wifi_country_t *country = NULL; + esp_wifi_remote_get_country(country); + } + + { + wifi_interface_t ifx = 0; + const uint8_t mac[6] = {}; + esp_wifi_remote_set_mac(ifx, mac); + } + + { + wifi_interface_t ifx = 0; + uint8_t mac[6] = {}; + esp_wifi_remote_get_mac(ifx, mac); + } + + { + wifi_promiscuous_cb_t cb = 0; + esp_wifi_remote_set_promiscuous_rx_cb(cb); + } + + { + _Bool en = 0; + esp_wifi_remote_set_promiscuous(en); + } + + { + _Bool *en = NULL; + esp_wifi_remote_get_promiscuous(en); + } + + { + const wifi_promiscuous_filter_t *filter = NULL; + esp_wifi_remote_set_promiscuous_filter(filter); + } + + { + wifi_promiscuous_filter_t *filter = NULL; + esp_wifi_remote_get_promiscuous_filter(filter); + } + + { + const wifi_promiscuous_filter_t *filter = NULL; + esp_wifi_remote_set_promiscuous_ctrl_filter(filter); + } + + { + wifi_promiscuous_filter_t *filter = NULL; + esp_wifi_remote_get_promiscuous_ctrl_filter(filter); + } + + { + wifi_interface_t interface = 0; + wifi_config_t *conf = NULL; + esp_wifi_remote_set_config(interface, conf); + } + + { + wifi_interface_t interface = 0; + wifi_config_t *conf = NULL; + esp_wifi_remote_get_config(interface, conf); + } + + { + wifi_sta_list_t *sta = NULL; + esp_wifi_remote_ap_get_sta_list(sta); + } + + { + const uint8_t mac[6] = {}; + uint16_t *aid = NULL; + esp_wifi_remote_ap_get_sta_aid(mac, aid); + } + + { + wifi_storage_t storage = 0; + esp_wifi_remote_set_storage(storage); + } + + { + _Bool enable = 0; + wifi_vendor_ie_type_t type = 0; + wifi_vendor_ie_id_t idx = 0; + const void *vnd_ie = NULL; + esp_wifi_remote_set_vendor_ie(enable, type, idx, vnd_ie); + } + + { + esp_vendor_ie_cb_t cb = 0; + void *ctx = NULL; + esp_wifi_remote_set_vendor_ie_cb(cb, ctx); + } + + { + int8_t power = 0; + esp_wifi_remote_set_max_tx_power(power); + } + + { + int8_t *power = NULL; + esp_wifi_remote_get_max_tx_power(power); + } + + { + uint32_t mask = 0; + esp_wifi_remote_set_event_mask(mask); + } + + { + uint32_t *mask = NULL; + esp_wifi_remote_get_event_mask(mask); + } + + { + wifi_interface_t ifx = 0; + const void *buffer = NULL; + int len = 0; + _Bool en_sys_seq = 0; + esp_wifi_remote_80211_tx(ifx, buffer, len, en_sys_seq); + } + + { + wifi_csi_cb_t cb = 0; + void *ctx = NULL; + esp_wifi_remote_set_csi_rx_cb(cb, ctx); + } + + { + const wifi_csi_config_t *config = NULL; + esp_wifi_remote_set_csi_config(config); + } + + { + _Bool en = 0; + esp_wifi_remote_set_csi(en); + } + + { + const wifi_ant_gpio_config_t *config = NULL; + esp_wifi_remote_set_ant_gpio(config); + } + + { + wifi_ant_gpio_config_t *config = NULL; + esp_wifi_remote_get_ant_gpio(config); + } + + { + const wifi_ant_config_t *config = NULL; + esp_wifi_remote_set_ant(config); + } + + { + wifi_ant_config_t *config = NULL; + esp_wifi_remote_get_ant(config); + } + + { + wifi_interface_t interface = 0; + esp_wifi_remote_get_tsf_time(interface); + } + + { + wifi_interface_t ifx = 0; + uint16_t sec = 0; + esp_wifi_remote_set_inactive_time(ifx, sec); + } + + { + wifi_interface_t ifx = 0; + uint16_t *sec = NULL; + esp_wifi_remote_get_inactive_time(ifx, sec); + } + + { + uint32_t modules = 0; + esp_wifi_remote_statis_dump(modules); + } + + { + int32_t rssi = 0; + esp_wifi_remote_set_rssi_threshold(rssi); + } + + { + wifi_ftm_initiator_cfg_t *cfg = NULL; + esp_wifi_remote_ftm_initiate_session(cfg); + } + + { + esp_wifi_remote_ftm_end_session(); + } + + { + int16_t offset_cm = 0; + esp_wifi_remote_ftm_resp_set_offset(offset_cm); + } + + { + wifi_interface_t ifx = 0; + _Bool disable = 0; + esp_wifi_remote_config_11b_rate(ifx, disable); + } + + { + uint16_t wake_interval = 0; + esp_wifi_remote_connectionless_module_set_wake_interval(wake_interval); + } + + { + esp_wifi_remote_force_wakeup_acquire(); + } + + { + esp_wifi_remote_force_wakeup_release(); + } + + { + const char *country = NULL; + _Bool ieee80211d_enabled = 0; + esp_wifi_remote_set_country_code(country, ieee80211d_enabled); + } + + { + char *country = NULL; + esp_wifi_remote_get_country_code(country); + } + + { + wifi_interface_t ifx = 0; + wifi_phy_rate_t rate = 0; + esp_wifi_remote_config_80211_tx_rate(ifx, rate); + } + + { + wifi_interface_t ifx = 0; + esp_wifi_remote_disable_pmf_config(ifx); + } + + { + uint16_t *aid = NULL; + esp_wifi_remote_sta_get_aid(aid); + } + + { + wifi_phy_mode_t *phymode = NULL; + esp_wifi_remote_sta_get_negotiated_phymode(phymode); + } + + { + _Bool enabled = 0; + esp_wifi_remote_set_dynamic_cs(enabled); + } + + { + int *rssi = NULL; + esp_wifi_remote_sta_get_rssi(rssi); + } + +} diff --git a/components/esp_wifi_remote/test/smoke_test/main/smoke_test.c b/components/esp_wifi_remote/test/smoke_test/main/smoke_test.c index 7a6acfff671..b8fd2955715 100644 --- a/components/esp_wifi_remote/test/smoke_test/main/smoke_test.c +++ b/components/esp_wifi_remote/test/smoke_test/main/smoke_test.c @@ -6,8 +6,11 @@ #include #include "esp_wifi_remote.h" +void run_all_wifi_apis(void); +void run_all_wifi_remote_apis(void); + void app_main(void) { - const wifi_init_config_t config = {}; - esp_wifi_remote_init(&config); + run_all_wifi_apis(); + run_all_wifi_remote_apis(); }