|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
The radio under esp_wifi, as wifi_access.c sees it. More...
#include <stdbool.h>#include <stdint.h>#include "esp_err.h"Go to the source code of this file.
Functions | |
| void | wifi_radio_mac (uint8_t mac[6]) |
| 6 bytes that differ from board to board, for the network name. | |
| esp_err_t | wifi_radio_link (void) |
| Bring the link to the C6 up, before esp_wifi_init(). | |
| bool | wifi_radio_failed (void) |
| Whether the link has failed since the panel started. | |
The radio under esp_wifi, as wifi_access.c sees it.
The ESP32-P4 has no radio: the 7-inch display board from Waveshare carries an ESP32-C6 on SDIO (Secure Digital input/output) slot 1, and the esp_wifi calls reach it through the managed components esp_wifi_remote and esp_hosted. This file brings that link up, reports the C6's firmware version, and turns a failure of the link into a failed start instead of a restart of the panel.
SPDX-License-Identifier: MIT
| bool wifi_radio_failed | ( | void | ) |
Whether the link has failed since the panel started.
| esp_err_t wifi_radio_link | ( | void | ) |
Bring the link to the C6 up, before esp_wifi_init().
Called from the task that brings the radio up. The first call resets the C6 (EN low for 10ms, then a fixed 1,500ms, CONFIG_ESP_HOSTED_SDIO_RESET_DELAY_MS), starts it as an SDIO card and waits for its start event, polling every 200ms. A C6 that starts as a card and sends no start event is reset again after 50 and after 100 polls; the call returns after about 25s. A C6 that does not start as a card ends the call after the card's start-up, at least 1,500ms. Then esp_hosted's TRANSPORT_UP event is awaited for at most 1,000ms. The C6's firmware version is logged once. Later calls with the link up return at once, with no reset.
| void wifi_radio_mac | ( | uint8_t | mac[6] | ) |
6 bytes that differ from board to board, for the network name.
The ESP32-P4's base MAC (media access control) address from eFuse, read for wa_name().
| mac | Receives the 6 bytes. |