Crate esp_phy

Crate esp_phy 

Source
Expand description

PHY initialization handling for chips with a radio.

§Usage

§Enabling and Disabling the PHY

The PhyController trait is implemented for all modem peripherals (WIFI, BT and IEEE802154), that are present for a particular chip. See its documentation for further usage instructions.

§Backing Up and Restoring PHY Calibration Data

If the PHY has already been calibrated, you can use backup_phy_calibration_data to persist calibration data elsewhere (e.g. in flash). Using set_phy_calibration_data you can restore previously persisted calibration data.

§Config Options

OptionStabilityDefault valueAllowed values

ESP_PHY_CONFIG_PHY_ENABLE_USB

Keeps USB running when using WiFi. This allows debugging and log messages via USB Serial JTAG. Turn off for best WiFi performance.

⚠️ Unstabletrue

ESP_PHY_CONFIG_PHY_SKIP_CALIBRATION_AFTER_DEEP_SLEEP

Use PHY_RF_CAL_NONE after deep sleep.

⚠️ Unstablefalse

ESP_PHY_CONFIG_PHY_FULL_CALIBRATION

Use PHY_RF_CAL_FULL instead of PHY_RF_CAL_PARTIAL.

⚠️ Unstabletrue

§Feature Flags

§Logging Feature Flags

  • defmt — Enable logging output using defmt and implement defmt::Format on certain types.
  • log-04 — Enable logging output using version 0.4 of the log crate.

§Chip selection

One of the following features must be enabled to select the target chip:

  • esp32c2
  • esp32c3
  • esp32c6
  • esp32h2
  • esp32
  • esp32s2
  • esp32s3

Structs§

CalibrationDataAlreadySetError
Calibration data was already set.
NoCalibrationDataError
No calibration data is available.
PhyInitGuard
Prevents the PHY from being deinitialized.

Constants§

PHY_CALIBRATION_DATA_LENGTH
Length of the PHY calibration data.

Traits§

PhyController
Common functionality for controlling PHY initialization.

Functions§

backup_phy_calibration_data
Backup the PHY calibration data to the provided slice.
set_phy_calibration_data
Load previously backed up PHY calibration data.

Type Aliases§

PhyCalibrationData
Type alias for opaque calibration data.