const BLE_ADV_TYPE_IND
pub const BLE_ADV_TYPE_IND = 0x00Purpose
BLE GAP Advertising Types
#embedded/chips/esp32ESP32 Chip Standard Library Package Provides MMIO registers, WDT, GPIO, IO_MUX, UART, SPI, Timer, Wi-Fi, and Bluetooth (BLE).
const BLE_ADV_TYPE_INDpub const BLE_ADV_TYPE_IND = 0x00BLE GAP Advertising Types
const BLE_ADV_TYPE_DIRECT_INDpub const BLE_ADV_TYPE_DIRECT_IND = 0x01Constant BLE_ADV_TYPE_DIRECT_IND, defining protocol or algorithm parameters.
const BLE_ADV_TYPE_SCAN_INDpub const BLE_ADV_TYPE_SCAN_IND = 0x02Constant BLE_ADV_TYPE_SCAN_IND, defining protocol or algorithm parameters.
const BLE_ADV_TYPE_NONCONN_INDpub const BLE_ADV_TYPE_NONCONN_IND = 0x03Constant BLE_ADV_TYPE_NONCONN_IND, defining protocol or algorithm parameters.
const BLE_GAP_AD_FLAGSpub const BLE_GAP_AD_FLAGS = 0x01BLE GAP AD (Advertising Data) Types per Bluetooth SIG
const BLE_GAP_AD_UUID16_SOMEpub const BLE_GAP_AD_UUID16_SOME = 0x02Constant BLE_GAP_AD_UUID16_SOME, defining protocol or algorithm parameters.
const BLE_GAP_AD_UUID16_ALLpub const BLE_GAP_AD_UUID16_ALL = 0x03Constant BLE_GAP_AD_UUID16_ALL, defining protocol or algorithm parameters.
const BLE_GAP_AD_UUID32_SOMEpub const BLE_GAP_AD_UUID32_SOME = 0x04Constant BLE_GAP_AD_UUID32_SOME, defining protocol or algorithm parameters.
const BLE_GAP_AD_UUID32_ALLpub const BLE_GAP_AD_UUID32_ALL = 0x05Constant BLE_GAP_AD_UUID32_ALL, defining protocol or algorithm parameters.
const BLE_GAP_AD_UUID128_SOMEpub const BLE_GAP_AD_UUID128_SOME = 0x06Constant BLE_GAP_AD_UUID128_SOME, defining protocol or algorithm parameters.
const BLE_GAP_AD_UUID128_ALLpub const BLE_GAP_AD_UUID128_ALL = 0x07Constant BLE_GAP_AD_UUID128_ALL, defining protocol or algorithm parameters.
const BLE_GAP_AD_NAME_SHORTpub const BLE_GAP_AD_NAME_SHORT = 0x08Constant BLE_GAP_AD_NAME_SHORT, defining protocol or algorithm parameters.
const BLE_GAP_AD_NAME_COMPLETEpub const BLE_GAP_AD_NAME_COMPLETE = 0x09Constant BLE_GAP_AD_NAME_COMPLETE, defining protocol or algorithm parameters.
const BLE_GAP_AD_TX_PWRpub const BLE_GAP_AD_TX_PWR = 0x0AConstant BLE_GAP_AD_TX_PWR, defining protocol or algorithm parameters.
const BLE_GAP_FLAG_LE_LIMITED_DISCpub const BLE_GAP_FLAG_LE_LIMITED_DISC = 0x01BLE Advertising Flags
const BLE_GAP_FLAG_LE_GEN_DISCpub const BLE_GAP_FLAG_LE_GEN_DISC = 0x02Constant BLE_GAP_FLAG_LE_GEN_DISC, defining protocol or algorithm parameters.
const BLE_GAP_FLAG_BR_EDR_NOT_SUPPpub const BLE_GAP_FLAG_BR_EDR_NOT_SUPP = 0x04Constant BLE_GAP_FLAG_BR_EDR_NOT_SUPP, defining protocol or algorithm parameters.
const BLE_UUID_SERV_HIDpub const BLE_UUID_SERV_HID = 0x1812Standard GATT Service UUIDs
const BLE_UUID_SERV_BATTERYpub const BLE_UUID_SERV_BATTERY = 0x180FConstant BLE_UUID_SERV_BATTERY, defining protocol or algorithm parameters.
const BLE_UUID_SERV_DEVINFOpub const BLE_UUID_SERV_DEVINFO = 0x180AConstant BLE_UUID_SERV_DEVINFO, defining protocol or algorithm parameters.
const HID_MOUSE_BTN_NONEpub const HID_MOUSE_BTN_NONE = 0x00HID Mouse Button Masks
const HID_MOUSE_BTN_LEFTpub const HID_MOUSE_BTN_LEFT = 0x01Constant HID_MOUSE_BTN_LEFT, defining protocol or algorithm parameters.
const HID_MOUSE_BTN_RIGHTpub const HID_MOUSE_BTN_RIGHT = 0x02Constant HID_MOUSE_BTN_RIGHT, defining protocol or algorithm parameters.
const HID_MOUSE_BTN_MIDDLEpub const HID_MOUSE_BTN_MIDDLE = 0x04Constant HID_MOUSE_BTN_MIDDLE, defining protocol or algorithm parameters.
const HID_MOD_LCTRLpub const HID_MOD_LCTRL = 0x01HID Keyboard Modifiers
const HID_MOD_LSHIFTpub const HID_MOD_LSHIFT = 0x02Constant HID_MOD_LSHIFT, defining protocol or algorithm parameters.
const HID_MOD_LALTpub const HID_MOD_LALT = 0x04Constant HID_MOD_LALT, defining protocol or algorithm parameters.
const HID_MOD_LGUIpub const HID_MOD_LGUI = 0x08Constant HID_MOD_LGUI, defining protocol or algorithm parameters.
const HID_MOD_RCTRLpub const HID_MOD_RCTRL = 0x10Constant HID_MOD_RCTRL, defining protocol or algorithm parameters.
const HID_MOD_RSHIFTpub const HID_MOD_RSHIFT = 0x20Constant HID_MOD_RSHIFT, defining protocol or algorithm parameters.
const HID_MOD_RALTpub const HID_MOD_RALT = 0x40Constant HID_MOD_RALT, defining protocol or algorithm parameters.
const HID_MOD_RGUIpub const HID_MOD_RGUI = 0x80Constant HID_MOD_RGUI, defining protocol or algorithm parameters.
const HID_KEY_Apub const HID_KEY_A = 0x04Standard HID Keycodes
const HID_KEY_Bpub const HID_KEY_B = 0x05Constant HID_KEY_B, defining protocol or algorithm parameters.
const HID_KEY_Cpub const HID_KEY_C = 0x06Constant HID_KEY_C, defining protocol or algorithm parameters.
const HID_KEY_Hpub const HID_KEY_H = 0x0BConstant HID_KEY_H, defining protocol or algorithm parameters.
const HID_KEY_ENTERpub const HID_KEY_ENTER = 0x28Constant HID_KEY_ENTER, defining protocol or algorithm parameters.
const HID_KEY_ESCpub const HID_KEY_ESC = 0x29Constant HID_KEY_ESC, defining protocol or algorithm parameters.
const HID_KEY_SPACEpub const HID_KEY_SPACE = 0x2CConstant HID_KEY_SPACE, defining protocol or algorithm parameters.
const HID_CONSUMER_VOLUME_UPpub const HID_CONSUMER_VOLUME_UP = 0xE9HID Consumer Usage Codes (Volume / Media)
const HID_CONSUMER_VOLUME_DOWNpub const HID_CONSUMER_VOLUME_DOWN = 0xEAConstant HID_CONSUMER_VOLUME_DOWN, defining protocol or algorithm parameters.
const HID_CONSUMER_MUTEpub const HID_CONSUMER_MUTE = 0xE2Constant HID_CONSUMER_MUTE, defining protocol or algorithm parameters.
const HID_CONSUMER_MENUpub const HID_CONSUMER_MENU = 0x40Constant HID_CONSUMER_MENU, defining protocol or algorithm parameters.
const DPORT_BT_LPCK_DIV_INT_REGpub const DPORT_BT_LPCK_DIV_INT_REG = 0x3FF000D4Bluetooth Baseband & Low-Power Clock Registers Corrected against components/soc/esp32/include/soc/dport_reg.h DR_REG_DPORT_BASE = 0x3FF00000 DPORT_BT_LPCK_DIV_INT_REG = DR_REG_DPORT_BASE + 0x0D4 = 0x3FF000D4 DPORT_BT_LPCK_DIV_FRAC_REG = DR_REG_DPORT_BASE + 0x0D8 = 0x3FF000D8 The previous values (0x3FF66044 / 0x3FF66048) point into DR_REG_APB_CTRL_BASE on ESP32 and never reached the Bluetooth low power clock divider.
const DPORT_BT_LPCK_DIV_FRAC_REGpub const DPORT_BT_LPCK_DIV_FRAC_REG = 0x3FF000D8Constant DPORT_BT_LPCK_DIV_FRAC_REG, defining protocol or algorithm parameters.
const BT_LPCLK_SEL_XTALpub const BT_LPCLK_SEL_XTAL = 0Constant BT_LPCLK_SEL_XTAL, defining protocol or algorithm parameters.
const BT_LPCLK_SEL_XTAL32Kpub const BT_LPCLK_SEL_XTAL32K = 1Constant BT_LPCLK_SEL_XTAL32K, defining protocol or algorithm parameters.
const BT_LPCLK_SEL_RTC_SLOWpub const BT_LPCLK_SEL_RTC_SLOW = 2Constant BT_LPCLK_SEL_RTC_SLOW, defining protocol or algorithm parameters.
const BT_LPCLK_SEL_8Mpub const BT_LPCLK_SEL_8M = 3Constant BT_LPCLK_SEL_8M, defining protocol or algorithm parameters.
const BT_LPCK_SEL_XTALpub const BT_LPCK_SEL_XTAL = 0x04000000Constant BT_LPCK_SEL_XTAL, defining protocol or algorithm parameters.
const BT_LPCK_SEL_XTAL32Kpub const BT_LPCK_SEL_XTAL32K = 0x08000000Constant BT_LPCK_SEL_XTAL32K, defining protocol or algorithm parameters.
const BT_LPCK_SEL_RTC_SLOWpub const BT_LPCK_SEL_RTC_SLOW = 0x01000000Constant BT_LPCK_SEL_RTC_SLOW, defining protocol or algorithm parameters.
const BT_LPCK_SEL_8Mpub const BT_LPCK_SEL_8M = 0x02000000Constant BT_LPCK_SEL_8M, defining protocol or algorithm parameters.
const BT_LPCK_SEL_MASKpub const BT_LPCK_SEL_MASK = 0x0F000000Constant BT_LPCK_SEL_MASK, defining protocol or algorithm parameters.
const BT_LPCK_DIV_NUM_MASKpub const BT_LPCK_DIV_NUM_MASK = 0x00000FFFConstant BT_LPCK_DIV_NUM_MASK, defining protocol or algorithm parameters.
const DPORT_BB_CLK_EN_REGpub const DPORT_BB_CLK_EN_REG = 0x3FF000CCDPORT Wi-Fi & Baseband Clock & Reset Registers
const DPORT_BB_RST_EN_REGpub const DPORT_BB_RST_EN_REG = 0x3FF000D0Constant DPORT_BB_RST_EN_REG, defining protocol or algorithm parameters.
const DPORT_PRO_BT_MAC_INTR_MAP_REGpub const DPORT_PRO_BT_MAC_INTR_MAP_REG = 0x3FF00110Constant DPORT_PRO_BT_MAC_INTR_MAP_REG, defining protocol or algorithm parameters.
const DPORT_PRO_BT_BB_INTR_MAP_REGpub const DPORT_PRO_BT_BB_INTR_MAP_REG = 0x3FF00114Constant DPORT_PRO_BT_BB_INTR_MAP_REG, defining protocol or algorithm parameters.
const DPORT_PRO_RWBT_IRQ_MAP_REGpub const DPORT_PRO_RWBT_IRQ_MAP_REG = 0x3FF0011CConstant DPORT_PRO_RWBT_IRQ_MAP_REG, defining protocol or algorithm parameters.
const DPORT_PRO_RWBLE_IRQ_MAP_REGpub const DPORT_PRO_RWBLE_IRQ_MAP_REG = 0x3FF00120Constant DPORT_PRO_RWBLE_IRQ_MAP_REG, defining protocol or algorithm parameters.
const DPORT_WIFI_CLK_WIFI_BT_COMMON_Mpub const DPORT_WIFI_CLK_WIFI_BT_COMMON_M = 0x000003C9DPORT Clock Enable bits for BT Baseband
const DPORT_WIFI_CLK_BT_EN_Mpub const DPORT_WIFI_CLK_BT_EN_M = 0x00030800Constant DPORT_WIFI_CLK_BT_EN_M, defining protocol or algorithm parameters.
const DPORT_WIFI_CLK_BT_LC_EN_Mpub const DPORT_WIFI_CLK_BT_LC_EN_M = 0x00030000Constant DPORT_WIFI_CLK_BT_LC_EN_M, defining protocol or algorithm parameters.
const DPORT_BT_RST_Mpub const DPORT_BT_RST_M = 0x00000008Constant DPORT_BT_RST_M, defining protocol or algorithm parameters.
bt_power_domain_onpub fn bt_power_domain_on() boolEnable 2.4GHz RF Baseband Clocks & Release Reset
No arguments are required.
bool — true or false
bt_rf_clock_enablepub fn bt_rf_clock_enable()Bt rf clock enable.
No arguments are required.
This call does not return a value.
bt_interrupt_routepub fn bt_interrupt_route()Route the two link-layer level sources to one level-1 CPU interrupt. These are RWBT/RWBLE (sources 6/7), not BT_MAC/BT_BB (sources 3/4). BT_BB has a separate PHY/tracking handler and must not share this route.
No arguments are required.
This call does not return a value.
bt_rf_bringup_sequencepub fn bt_rf_bringup_sequence() boolClock/reset prerequisites. PHY calibration and controller startup remain pending.
No arguments are required.
bool — true or false
const PIN_INPUTpub const PIN_INPUT = 0Constant PIN_INPUT, defining protocol or algorithm parameters.
const PIN_OUTPUTpub const PIN_OUTPUT = 1Constant PIN_OUTPUT, defining protocol or algorithm parameters.
const PIN_INPUT_PULLUPpub const PIN_INPUT_PULLUP = 2Constant PIN_INPUT_PULLUP, defining protocol or algorithm parameters.
const PIN_INPUT_PULLDOWNpub const PIN_INPUT_PULLDOWN = 3Constant PIN_INPUT_PULLDOWN, defining protocol or algorithm parameters.
const PIN_LOWpub const PIN_LOW = 0Constant PIN_LOW, defining protocol or algorithm parameters.
const PIN_HIGHpub const PIN_HIGH = 1Constant PIN_HIGH, defining protocol or algorithm parameters.
gpio_pin_maskpub fn gpio_pin_mask(pin int) intGpio pin mask.
pin intint — a value of this type
gpio_config_muxpub fn gpio_config_mux(pin int, mux_val int)Gpio config mux.
pin intmux_val intThis call does not return a value.
gpio_route_outpub fn gpio_route_out(pin int)Routes the GPIO matrix output to the physical pad (SIG_GPIO_OUT_IDX = 0x100) Crucial for pins that default to JTAG or strapping functions at boot (e.g., 14, 13, 15, 2).
pin intThis call does not return a value.
gpio_initpub fn gpio_init(pin int, mode int)Gpio init.
pin intmode intThis call does not return a value.
gpio_set_highpub fn gpio_set_high(pin int)Gpio set high.
pin intThis call does not return a value.
gpio_set_lowpub fn gpio_set_low(pin int)Gpio set low.
pin intThis call does not return a value.
gpio_set_high_maskpub fn gpio_set_high_mask(mask int)Gpio set high mask.
mask intThis call does not return a value.
gpio_set_low_maskpub fn gpio_set_low_mask(mask int)Gpio set low mask.
mask intThis call does not return a value.
gpio_setpub fn gpio_set(pin int, val int)Gpio set.
pin intval intThis call does not return a value.
gpio_getpub fn gpio_get(pin int) intGpio get.
pin intint — a value of this type
gpio_togglepub fn gpio_toggle(pin int)Gpio toggle.
pin intThis call does not return a value.
bt_irq_rom_recover_assertionpub fn bt_irq_rom_recover_assertion(file int, line int, detail int) boolThis is an exact, evidence-bound recovery, not a general assert handler. The application's assertion callback must retain its fatal behavior when this returns false, including unknown/new ERRORSTAT values during repair.
file intline intdetail intbool — true or false
bt_irq_rom_recovery_errorpub fn bt_irq_rom_recovery_error() intBt irq rom recovery error.
No arguments are required.
int — a value of this type
bt_irq_rom_recovery_countpub fn bt_irq_rom_recovery_count() intBt irq rom recovery count.
No arguments are required.
int — a value of this type
bt_irq_rom_bb_servicepub fn bt_irq_rom_bb_service() intBt irq rom bb service.
No arguments are required.
int — a value of this type
bt_irq_rom_bb_attachpub fn bt_irq_rom_bb_attach() boolBt irq rom bb attach.
No arguments are required.
bool — true or false
bt_irq_rom_bb_enablepub fn bt_irq_rom_bb_enable() boolBt irq rom bb enable.
No arguments are required.
bool — true or false
bt_irq_rom_bb_errorpub fn bt_irq_rom_bb_error() intBt irq rom bb error.
No arguments are required.
int — a value of this type
irq_rom_maskpub fn irq_rom_mask(mask int) intIrq rom mask.
mask intint — a value of this type
irq_rom_unmaskpub fn irq_rom_unmask(mask int) intIrq rom unmask.
mask intint — a value of this type
irq_rom_set_levelpub fn irq_rom_set_level(level int) intIrq rom set level.
level intint — a value of this type
irq_rom_attach_btpub fn irq_rom_attach_bt(callback_address int, context int) boolCPU 4 is a level-1 external level interrupt, used by RWBT/RWBLE sources. ROM indexes its handler table in reverse CPU-interrupt order.
callback_address intcontext intbool — true or false
irq_rom_attach_timer0pub fn irq_rom_attach_timer0(callback_address int, context int) boolCPU 6 is CCOMPARE0, a level-1 timer interrupt. The hardware source is acknowledged by writing a new CCOMPARE0 value, not by raise_irq.
callback_address intcontext intbool — true or false
irq_rom_timer0_armpub fn irq_rom_timer0_arm(cycle_count int)Irq rom timer0 arm.
cycle_count intThis call does not return a value.
irq_rom_cycle_countpub fn irq_rom_cycle_count() intIrq rom cycle count.
No arguments are required.
int — a value of this type
irq_rom_pendingpub fn irq_rom_pending() intIrq rom pending.
No arguments are required.
int — a value of this type
bt_irq_rom_servicepub fn bt_irq_rom_service() intRAM intc.o's r_rwbtdm_isr calls the ROM BLE and BR/EDR handlers in this order. Both inspect/acknowledge their own peripheral status, so sharing one CPU level input is valid (the IDF wrapper does this on CPU IRQ 5). The controller task consumes the work flag outside the interrupt frame. State: count 3FFD73D0, pending work 3FFD73D4, last CPU pending 3FFD73D8. Never enable this before complete LL/RF/platform table initialization.
No arguments are required.
int — a value of this type
bt_irq_rom_attachpub fn bt_irq_rom_attach() boolAttaching and enabling are separate: bringing up the controller can bind its tables while all link-layer interrupt sources remain masked.
No arguments are required.
bool — true or false
bt_irq_rom_enablepub fn bt_irq_rom_enable() boolBt irq rom enable.
No arguments are required.
bool — true or false
bt_irq_rom_disablepub fn bt_irq_rom_disable()Bt irq rom disable.
No arguments are required.
This call does not return a value.
bt_irq_rom_countpub fn bt_irq_rom_count() intBt irq rom count.
No arguments are required.
int — a value of this type
bt_irq_rom_take_workpub fn bt_irq_rom_take_work() boolBt irq rom take work.
No arguments are required.
bool — true or false
bt_irq_rom_last_cyclespub fn bt_irq_rom_last_cycles() intBt irq rom last cycles.
No arguments are required.
int — a value of this type
bt_irq_rom_max_cyclespub fn bt_irq_rom_max_cycles() intBt irq rom max cycles.
No arguments are required.
int — a value of this type
bt_irq_rom_bb_last_cyclespub fn bt_irq_rom_bb_last_cycles() intBt irq rom bb last cycles.
No arguments are required.
int — a value of this type
bt_irq_rom_bb_max_cyclespub fn bt_irq_rom_bb_max_cycles() intBt irq rom bb max cycles.
No arguments are required.
int — a value of this type
llc_auth_rom_installpub fn llc_auth_rom_install(enabled bool) boolLlc auth rom install.
enabled boolbool — true or false
llc_auth_rom_errorpub fn llc_auth_rom_error() intLlc auth rom error.
No arguments are required.
int — a value of this type
llc_auth_rom_margin_countpub fn llc_auth_rom_margin_count() intLlc auth rom margin count.
No arguments are required.
int — a value of this type
llc_auth_rom_timeout_countpub fn llc_auth_rom_timeout_count() intLlc auth rom timeout count.
No arguments are required.
int — a value of this type
llc_auth_rom_last_statepub fn llc_auth_rom_last_state() intLlc auth rom last state.
No arguments are required.
int — a value of this type
llc_auth_rom_last_marginpub fn llc_auth_rom_last_margin() intLlc auth rom last margin.
No arguments are required.
int — a value of this type
llc_auth_rom_last_timeoutpub fn llc_auth_rom_last_timeout() intLlc auth rom last timeout.
No arguments are required.
int — a value of this type
llc_auth_rom_last_procedurepub fn llc_auth_rom_last_procedure() intLlc auth rom last procedure.
No arguments are required.
int — a value of this type
phy_prepare_analog_buspub fn phy_prepare_analog_bus() boolAnalog-bus prerequisites recovered from ESP32 libphy reg_init_begin(0) and i2cmst_reg_init. This does not run RF/PLL/IQ/TX-power calibration. The ROM PHY function table must be populated before using its I2C slots.
No arguments are required.
bool — true or false
phy_select_analog_blockpub fn phy_select_analog_block(block int) boolCold-start probe only: select one analog slave before using the ROM's raw I2C primitives. libphy's ram_chip_i2c_readReg adds this selection the ROM implementation itself does not. No controller/ISR may use the analog bus concurrently with this operation.
block intbool — true or false
phy_cal_bb_registers_initpub fn phy_cal_bb_registers_init() boolPhy cal bb registers init.
No arguments are required.
bool — true or false
phy_cal_hw_frequency_disablepub fn phy_cal_hw_frequency_disable() boolCold-start BT baseband register port, not PHY calibration. Recovered from librtc.a:bt_bb.o, bt_bb_init_cmplx and BT_init_rx_filters. The 0x600xxxxx APB addresses use their equivalent 0x3FFxxxxx aliases here.
No arguments are required.
bool — true or false
phy_cal_hw_frequency_enablepub fn phy_cal_hw_frequency_enable()Phy cal hw frequency enable.
No arguments are required.
This call does not return a value.
phy_cal_bt_baseband_initpub fn phy_cal_bt_baseband_init() boolRequires the PHY analog bus and Xu I2C callbacks to be installed. This supplies the register work of import_rf_phy slot +4, but does not claim RF/PLL/IQ/TX calibration or permission to start a radio event.
No arguments are required.
bool — true or false
phy_cal_channel_programmerpub fn phy_cal_channel_programmer() boolSpecialized eleven-command cold-start channel programmer from bt_get_i2c_data + bt_i2c_write_set, with the same RX/TX address maps. The shared RF frequency memory must already contain the 85 calibrated three-word tuples. This does not perform DC/IQ/TX-power calibration.
No arguments are required.
bool — true or false
phy_cal_rc_40mhzpub fn phy_cal_rc_40mhz() boolReal RC oscillator calibration: enable the reference, pulse the RC calibration start bit, wait 100 us, capture the six-bit result, and disable both reference and test mode. Captured values are retained for the later BB/IQ/power calibration stages, not substituted by constants.
No arguments are required.
bool — true or false
phy_cal_bt_prioritypub fn phy_cal_bt_priority() boolESP32 esp_phy_enable's post-calibration coex_bt_high_prio contract. Call while controller events/IRQs are stopped. This enables hardware arbitration and gives BT priority; it is not the force_bt_mode override. Keep each native RMW separate because intermediate values reach hardware.
No arguments are required.
bool — true or false
phy_cal_tx_releasepub fn phy_cal_tx_release() boolNative force_txrxoff(0) followed by the register_chipv7_phy tail. Caller must finish static BB initialization first. This releases the calibrated TX/PLL path to the MAC; it does not certify RX DC/IQ or start advertising, and does not commit the separate IRQ tracking ready marker.
No arguments are required.
bool — true or false
phy_cal_bt_gain_memorypub fn phy_cal_bt_gain_memory() boolPhy cal bt gain memory.
No arguments are required.
bool — true or false
phy_cal_install_i2cpub fn phy_cal_install_i2c() boolInstall after bt_power_domain_on, bt_rf_clock_enable and phy_prepare_analog_bus. All ROM PHY functions then use the Xu slave selection and bounded polling through their existing raw I2C slots.
No arguments are required.
bool — true or false
phy_cal_i2c_errorpub fn phy_cal_i2c_error() intPhy cal i2c error.
No arguments are required.
int — a value of this type
phy_cal_restore_i2cpub fn phy_cal_restore_i2c()Phy cal restore i2c.
No arguments are required.
This call does not return a value.
phy_cal_pbus_memory_initpub fn phy_cal_pbus_memory_init() boolram_set_pbus_mem's complete Wi-Fi/BT RX/TX/PA transition microsequences. These are PHY register commands generated by Xu, not executable machine code imported from an archive. Call while controller events/IRQs are off.
No arguments are required.
bool — true or false
phy_cal_analog_defaultspub fn phy_cal_analog_defaults() boolPhy cal analog defaults.
No arguments are required.
bool — true or false
phy_cal_rf_bus_initpub fn phy_cal_rf_bus_init() boolPhy cal rf bus init.
No arguments are required.
bool — true or false
phy_cal_pll_40mhzpub fn phy_cal_pll_40mhz() boolESP32 / 40 MHz XTAL only. Calibrate all 85 frequencies 2400..2484 MHz used by the ROM PHY's Wi-Fi/BT shared lookup memory. Hardware PLL done is checked at every frequency, with a maximum 2 ms wait per sample. Calling this does not mark the complete PHY or channel programmer ready.
No arguments are required.
bool — true or false
phy_cal_install_sarpub fn phy_cal_install_sar() boolPhy cal install sar.
No arguments are required.
bool — true or false
phy_cal_txcap_btpub fn phy_cal_txcap_bt() boolCalibrate PA tank capacitance at channels 1/7/11. The three-byte native records and fourth fallback record are kept at 0x3FFD7540..754B.
No arguments are required.
bool — true or false
phy_cal_txpower_btpub fn phy_cal_txpower_bt() boolPhy cal txpower bt.
No arguments are required.
bool — true or false
phy_cal_cold_resetpub fn phy_cal_cold_reset() boolCold-start prefix from the working C image's register_chipv7_phy reset_rf_dig -> phy_dis_hw_set_freq -> i2c_master_reset. Call only after RF power/clocks are on, with controller IRQs/events stopped, before any calibration. This is not the runtime BT-only recovery reset.
No arguments are required.
bool — true or false
phy_cal_rx_errorpub fn phy_cal_rx_error() intPhy cal rx error.
No arguments are required.
int — a value of this type
phy_cal_rx_stagespub fn phy_cal_rx_stages() intPhy cal rx stages.
No arguments are required.
int — a value of this type
phy_cal_rx_bt_calibratedpub fn phy_cal_rx_bt_calibrated() boolPhy cal rx bt calibrated.
No arguments are required.
bool — true or false
phy_cal_rx_bt_dcpub fn phy_cal_rx_bt_dc(index int) intPhy cal rx bt dc.
index intint — a value of this type
phy_cal_rx_bt_resultpub fn phy_cal_rx_bt_result(index int, component int) intcomponent 0/1 is signed I/Q differential residual; 2 is iterations.
index intcomponent intint — a value of this type
phy_cal_rx_btpub fn phy_cal_rx_bt() boolPhy cal rx bt.
No arguments are required.
bool — true or false
phy_cal_rx_bt_rf_gainpub fn phy_cal_rx_bt_rf_gain(index int) intPure arithmetic specialization of ram_gen_rx_gain_table for the native BT sweep (8 RF gains, LPF maximum 28, final baseband gain 6). Index 72 is deliberately included: the native generator emits before testing >28.
index intint — a value of this type
phy_cal_rx_bt_gain_atpub fn phy_cal_rx_bt_gain_at(index int) intPhy cal rx bt gain at.
index intint — a value of this type
phy_cal_power_detector_initpub fn phy_cal_power_detector_init() boolram_en_pwdet + pwdet_sar2_init. The ROM's older power-detector setup does not initialize the revised SAR2 path used by the 12-bit RAM reader.
No arguments are required.
bool — true or false
phy_cal_shared_tx_calibratepub fn phy_cal_shared_tx_calibrate() boolBLE on this ESP32 profile consumes the common TX bank (base110), even though the separate BT bank at base+8 is also initialized. A same-boot address-step probe established that distinction. Native set_tx_gain_table writes one common gain row eight times; it does not copy the BT rows. Scratch: 7498/749C are the measured common DC pair after PA-cap calibration 74BC is common IQ, 74DC its commit, 75B8..75C4 retain upload metadata.
No arguments are required.
bool — true or false
phy_cal_shared_gain_memorypub fn phy_cal_shared_gain_memory() boolPhy cal shared gain memory.
No arguments are required.
bool — true or false
const PHY_TRACKING_READYpub const PHY_TRACKING_READY = 0x5452414BBT-only runtime PLL-cap tracking, ported from libphy's bt_track_pll_cap, pll_correct_dcap, phy_dis_hw_set_freq and phy_en_hw_set_freq. The calibration driver owns the commit at 3FFD7780: write TRACKING_READY only after complete TX RF/channel-table initialization and readback pass. This runtime PLL marker does not authorize receiving or BLE connections. PLL1 alone only validates the PLL sweep, not the remaining PHY work.
phy_tracking_is_readypub fn phy_tracking_is_ready() boolWhether phy_tracking is ready.
No arguments are required.
bool — true or false
phy_tracking_errorpub fn phy_tracking_error() intPhy tracking error.
No arguments are required.
int — a value of this type
phy_tracking_countpub fn phy_tracking_count() intPhy tracking count.
No arguments are required.
int — a value of this type
phy_bt_track_pll_cappub fn phy_bt_track_pll_cap() boolPhy bt track pll cap.
No arguments are required.
bool — true or false
phy_cal_install_pbuspub fn phy_cal_install_pbus() boolPhy cal install pbus.
No arguments are required.
bool — true or false
phy_cal_txdc_btpub fn phy_cal_txdc_bt() boolPhy cal txdc bt.
No arguments are required.
bool — true or false
phy_cal_tone_powerpub fn phy_cal_tone_power() intROM txtone_linear_pwr(false), using the RAM revision's twelve-bit SAR reader and bounded acquisition instead of the older ROM SAR primitive.
No arguments are required.
int — a value of this type
phy_cal_txiq_btpub fn phy_cal_txiq_bt() boolPhy cal txiq bt.
No arguments are required.
bool — true or false
const VENDOR_PHY_GET_ROMFUNC_ADDRpub const VENDOR_PHY_GET_ROMFUNC_ADDR = 0x40153E4CBlob symbol addresses. Regenerated by build_vendor_phy_blob.sh; keep in sync with examples/esp32/tools/vendor_phy_blob_map.txt. Blob segments: DRAM 0x3FFD9000, IRAM 0x4008C000, IROM 0x40150000.
const VENDOR_BT_BB_INIT_CMPLXpub const VENDOR_BT_BB_INIT_CMPLX = 0x4008E294Constant VENDOR_BT_BB_INIT_CMPLX, defining protocol or algorithm parameters.
const PHY_ROM_TABLEpub const PHY_ROM_TABLE = 0x3FFAE0C4ROM DRAM base of the PHY function table.
const PHY_ROM_DEFAULT_SLOT0pub const PHY_ROM_DEFAULT_SLOT0 = 0x40002F6CROM default of slot 0 (rom_phy_disable_agc). Used as the "not overridden" witness: the vendor installer replaces it with ram_disable_agc.
const PHY_ROM_IMPORTpub const PHY_ROM_IMPORT = 0x3FFB8354ROM import table (r_import_rf_phy_func). Slot 1 is the baseband init hook.
phy_rom_table_basepub fn phy_rom_table_base() intPhy rom table base name.
No arguments are required.
int — a value of this type
phy_rom_vendor_installpub fn phy_rom_vendor_install() boolCall the vendor installer and check that the ROM table now holds the vendor PHY entries instead of the ROM defaults. Call this after the PHY calibration chain and before the controller is started: the calibration wants the Xu analog I2C replacements, the radio wants the vendor PHY entries.
No arguments are required.
bool — true or false
phy_rom_vendor_bb_installpub fn phy_rom_vendor_bb_install() boolInstall the vendor baseband init into the ROM import table, so the ROM RF init calls the official bt_bb_init_cmplx sequence.
No arguments are required.
bool — true or false
phy_rom_slotpub fn phy_rom_slot(index int) intRead one PHY table slot at runtime.
index intint — a value of this type
radio_rf_errorpub fn radio_rf_error() intRadio rf error.
No arguments are required.
int — a value of this type
radio_rf_stagespub fn radio_rf_stages() intRadio rf stages.
No arguments are required.
int — a value of this type
radio_controller_memory_initpub fn radio_controller_memory_init() boolCold boot only, with controller IRQs masked and before PHY/RF/LL init. ROM DATA_INIT does not clear exchange memory. IDF's caller supplies this separate initialization; this Xu profile reserves the whole 32 KiB EM.
No arguments are required.
bool — true or false
radio_clock_xtal_40mhzpub fn radio_clock_xtal_40mhz() boolRadio clock xtal 40mhz.
No arguments are required.
bool — true or false
radio_rf_readbackpub fn radio_rf_readback() boolAlso call after LL initialization, before enabling radio IRQs/events, to detect any later initializer overwriting the reserved frequency map.
No arguments are required.
bool — true or false
radio_rf_cold_initpub fn radio_rf_cold_init() boolRadio rf cold init.
No arguments are required.
bool — true or false
radio_event_arbiter_initpub fn radio_event_arbiter_init() boolRadio event arbiter init.
No arguments are required.
bool — true or false
const GPIO_OUT_REGpub const GPIO_OUT_REG = 0x3FF44004GPIO registers (Base: 0x3FF44000)
const GPIO_OUT_W1TS_REGpub const GPIO_OUT_W1TS_REG = 0x3FF44008Constant GPIO_OUT_W1TS_REG, defining protocol or algorithm parameters.
const GPIO_OUT_W1TC_REGpub const GPIO_OUT_W1TC_REG = 0x3FF4400CConstant GPIO_OUT_W1TC_REG, defining protocol or algorithm parameters.
const GPIO_OUT1_REGpub const GPIO_OUT1_REG = 0x3FF44010Constant GPIO_OUT1_REG, defining protocol or algorithm parameters.
const GPIO_OUT1_W1TS_REGpub const GPIO_OUT1_W1TS_REG = 0x3FF44014Constant GPIO_OUT1_W1TS_REG, defining protocol or algorithm parameters.
const GPIO_OUT1_W1TC_REGpub const GPIO_OUT1_W1TC_REG = 0x3FF44018Constant GPIO_OUT1_W1TC_REG, defining protocol or algorithm parameters.
const GPIO_ENABLE_REGpub const GPIO_ENABLE_REG = 0x3FF44020Constant GPIO_ENABLE_REG, defining protocol or algorithm parameters.
const GPIO_ENABLE_W1TS_REGpub const GPIO_ENABLE_W1TS_REG = 0x3FF44024Constant GPIO_ENABLE_W1TS_REG, defining protocol or algorithm parameters.
const GPIO_ENABLE_W1TC_REGpub const GPIO_ENABLE_W1TC_REG = 0x3FF44028Constant GPIO_ENABLE_W1TC_REG, defining protocol or algorithm parameters.
const GPIO_ENABLE1_REGpub const GPIO_ENABLE1_REG = 0x3FF4402CConstant GPIO_ENABLE1_REG, defining protocol or algorithm parameters.
const GPIO_ENABLE1_W1TS_REGpub const GPIO_ENABLE1_W1TS_REG = 0x3FF44030Constant GPIO_ENABLE1_W1TS_REG, defining protocol or algorithm parameters.
const GPIO_ENABLE1_W1TC_REGpub const GPIO_ENABLE1_W1TC_REG = 0x3FF44034Constant GPIO_ENABLE1_W1TC_REG, defining protocol or algorithm parameters.
const GPIO_IN_REGpub const GPIO_IN_REG = 0x3FF4403CConstant GPIO_IN_REG, defining protocol or algorithm parameters.
const GPIO_IN1_REGpub const GPIO_IN1_REG = 0x3FF44040Constant GPIO_IN1_REG, defining protocol or algorithm parameters.
const IO_MUX_PIN_CTRLpub const IO_MUX_PIN_CTRL = 0x3FF49000IO MUX registers (Base: 0x3FF49000)
const IO_MUX_GPIO0_REGpub const IO_MUX_GPIO0_REG = 0x3FF49044Constant IO_MUX_GPIO0_REG, defining protocol or algorithm parameters.
const IO_MUX_GPIO2_REGpub const IO_MUX_GPIO2_REG = 0x3FF49040Constant IO_MUX_GPIO2_REG, defining protocol or algorithm parameters.
const IO_MUX_GPIO4_REGpub const IO_MUX_GPIO4_REG = 0x3FF49048Constant IO_MUX_GPIO4_REG, defining protocol or algorithm parameters.
const IO_MUX_GPIO5_REGpub const IO_MUX_GPIO5_REG = 0x3FF4906CConstant IO_MUX_GPIO5_REG, defining protocol or algorithm parameters.
const IO_MUX_GPIO12_REGpub const IO_MUX_GPIO12_REG = 0x3FF49034Constant IO_MUX_GPIO12_REG, defining protocol or algorithm parameters.
const IO_MUX_GPIO13_REGpub const IO_MUX_GPIO13_REG = 0x3FF49038Constant IO_MUX_GPIO13_REG, defining protocol or algorithm parameters.
const IO_MUX_GPIO14_REGpub const IO_MUX_GPIO14_REG = 0x3FF49030Constant IO_MUX_GPIO14_REG, defining protocol or algorithm parameters.
const IO_MUX_GPIO15_REGpub const IO_MUX_GPIO15_REG = 0x3FF4903CConstant IO_MUX_GPIO15_REG, defining protocol or algorithm parameters.
const IO_MUX_GPIO16_REGpub const IO_MUX_GPIO16_REG = 0x3FF4904CConstant IO_MUX_GPIO16_REG, defining protocol or algorithm parameters.
const IO_MUX_GPIO17_REGpub const IO_MUX_GPIO17_REG = 0x3FF49050Constant IO_MUX_GPIO17_REG, defining protocol or algorithm parameters.
const IO_MUX_GPIO18_REGpub const IO_MUX_GPIO18_REG = 0x3FF49070Constant IO_MUX_GPIO18_REG, defining protocol or algorithm parameters.
const IO_MUX_GPIO19_REGpub const IO_MUX_GPIO19_REG = 0x3FF49074Constant IO_MUX_GPIO19_REG, defining protocol or algorithm parameters.
const IO_MUX_GPIO21_REGpub const IO_MUX_GPIO21_REG = 0x3FF4907CConstant IO_MUX_GPIO21_REG, defining protocol or algorithm parameters.
const IO_MUX_GPIO22_REGpub const IO_MUX_GPIO22_REG = 0x3FF49080Constant IO_MUX_GPIO22_REG, defining protocol or algorithm parameters.
const IO_MUX_GPIO23_REGpub const IO_MUX_GPIO23_REG = 0x3FF49084Constant IO_MUX_GPIO23_REG, defining protocol or algorithm parameters.
const IO_MUX_GPIO25_REGpub const IO_MUX_GPIO25_REG = 0x3FF49024Constant IO_MUX_GPIO25_REG, defining protocol or algorithm parameters.
const IO_MUX_GPIO26_REGpub const IO_MUX_GPIO26_REG = 0x3FF49028Constant IO_MUX_GPIO26_REG, defining protocol or algorithm parameters.
const IO_MUX_GPIO27_REGpub const IO_MUX_GPIO27_REG = 0x3FF4902CConstant IO_MUX_GPIO27_REG, defining protocol or algorithm parameters.
const IO_MUX_GPIO32_REGpub const IO_MUX_GPIO32_REG = 0x3FF4901CConstant IO_MUX_GPIO32_REG, defining protocol or algorithm parameters.
const IO_MUX_GPIO33_REGpub const IO_MUX_GPIO33_REG = 0x3FF49020Constant IO_MUX_GPIO33_REG, defining protocol or algorithm parameters.
const IO_MUX_GPIO34_REGpub const IO_MUX_GPIO34_REG = 0x3FF49014Constant IO_MUX_GPIO34_REG, defining protocol or algorithm parameters.
const IO_MUX_GPIO35_REGpub const IO_MUX_GPIO35_REG = 0x3FF49018Constant IO_MUX_GPIO35_REG, defining protocol or algorithm parameters.
const IO_MUX_GPIO36_REGpub const IO_MUX_GPIO36_REG = 0x3FF49004Constant IO_MUX_GPIO36_REG, defining protocol or algorithm parameters.
const IO_MUX_GPIO37_REGpub const IO_MUX_GPIO37_REG = 0x3FF49008Constant IO_MUX_GPIO37_REG, defining protocol or algorithm parameters.
const IO_MUX_GPIO38_REGpub const IO_MUX_GPIO38_REG = 0x3FF4900CConstant IO_MUX_GPIO38_REG, defining protocol or algorithm parameters.
const IO_MUX_GPIO39_REGpub const IO_MUX_GPIO39_REG = 0x3FF49010Constant IO_MUX_GPIO39_REG, defining protocol or algorithm parameters.
const UART0_FIFO_REGpub const UART0_FIFO_REG = 0x3FF40000UART0 registers (Base: 0x3FF40000)
const UART0_INT_RAW_REGpub const UART0_INT_RAW_REG = 0x3FF40004Constant UART0_INT_RAW_REG, defining protocol or algorithm parameters.
const UART0_STATUS_REGpub const UART0_STATUS_REG = 0x3FF4001CConstant UART0_STATUS_REG, defining protocol or algorithm parameters.
const TIMG0_T0CONFIG_REGpub const TIMG0_T0CONFIG_REG = 0x3FF5F000Timer Group 0 & Watchdog registers
const TIMG0_T0LO_REGpub const TIMG0_T0LO_REG = 0x3FF5F004Constant TIMG0_T0LO_REG, defining protocol or algorithm parameters.
const TIMG0_T0HI_REGpub const TIMG0_T0HI_REG = 0x3FF5F008Constant TIMG0_T0HI_REG, defining protocol or algorithm parameters.
const TIMG0_T0UPDATE_REGpub const TIMG0_T0UPDATE_REG = 0x3FF5F00CConstant TIMG0_T0UPDATE_REG, defining protocol or algorithm parameters.
const TIMG0_WDTCONFIG0_REGpub const TIMG0_WDTCONFIG0_REG = 0x3FF5F048Constant TIMG0_WDTCONFIG0_REG, defining protocol or algorithm parameters.
const TIMG0_WDTFEED_REGpub const TIMG0_WDTFEED_REG = 0x3FF5F060Constant TIMG0_WDTFEED_REG, defining protocol or algorithm parameters.
const TIMG0_WDTWPROTECT_REGpub const TIMG0_WDTWPROTECT_REG= 0x3FF5F064Constant TIMG0_WDTWPROTECT_REG, defining protocol or algorithm parameters.
const TIMG1_WDTCONFIG0_REGpub const TIMG1_WDTCONFIG0_REG = 0x3FF60048Timer Group 1 Watchdog registers
const TIMG1_WDTFEED_REGpub const TIMG1_WDTFEED_REG = 0x3FF60060Constant TIMG1_WDTFEED_REG, defining protocol or algorithm parameters.
const TIMG1_WDTWPROTECT_REGpub const TIMG1_WDTWPROTECT_REG= 0x3FF60064Constant TIMG1_WDTWPROTECT_REG, defining protocol or algorithm parameters.
const RTC_CNTL_WDTCONFIG0_REGpub const RTC_CNTL_WDTCONFIG0_REG = 0x3FF4808CRTC Controller Watchdog registers
const RTC_CNTL_WDTFEED_REGpub const RTC_CNTL_WDTFEED_REG = 0x3FF480A0Constant RTC_CNTL_WDTFEED_REG, defining protocol or algorithm parameters.
const RTC_CNTL_WDTWPROTECT_REGpub const RTC_CNTL_WDTWPROTECT_REG= 0x3FF480A4Constant RTC_CNTL_WDTWPROTECT_REG, defining protocol or algorithm parameters.
const WDT_WKEYpub const WDT_WKEY = 0x50D83AA1Constant WDT_WKEY, defining protocol or algorithm parameters.
const ROM_ETS_GET_CPU_FREQUENCYpub const ROM_ETS_GET_CPU_FREQUENCY = 0x4000855CESP32 mask-ROM addresses from IDF components/esp_rom/esp32/ld/esp32.rom.ld. Calls use the windowed ROM ABI, not Xu's call0/function-value ABI.
const ROM_ETS_DELAY_USpub const ROM_ETS_DELAY_US = 0x40008534Constant ROM_ETS_DELAY_US, defining protocol or algorithm parameters.
const ROM_MEMSETpub const ROM_MEMSET = 0x4000C44CConstant ROM_MEMSET, defining protocol or algorithm parameters.
const ROM_MEMCPYpub const ROM_MEMCPY = 0x4000C2C8Constant ROM_MEMCPY, defining protocol or algorithm parameters.
const ROM_BTDM_VERSION_GETpub const ROM_BTDM_VERSION_GET = 0x40010078Constant ROM_BTDM_VERSION_GET, defining protocol or algorithm parameters.
const ROM_BTDM_DATA_INITpub const ROM_BTDM_DATA_INIT = 0x4001002CConstant ROM_BTDM_DATA_INIT, defining protocol or algorithm parameters.
const ROM_PHY_GET_ROMFUNCSpub const ROM_PHY_GET_ROMFUNCS = 0x40004100Constant ROM_PHY_GET_ROMFUNCS, defining protocol or algorithm parameters.
const ROM_BTDM_BSS_STARTpub const ROM_BTDM_BSS_START = 0x3FFB8000Constant ROM_BTDM_BSS_START, defining protocol or algorithm parameters.
const ROM_BTDM_BSS_BYTESpub const ROM_BTDM_BSS_BYTES = 32624Constant ROM_BTDM_BSS_BYTES, defining protocol or algorithm parameters.
rom_cpu_mhzpub fn rom_cpu_mhz() intRom cpu mhz.
No arguments are required.
int — a value of this type
rom_delay_uspub fn rom_delay_us(us int)Rom delay us.
us intThis call does not return a value.
rom_bt_versionpub fn rom_bt_version() intRom bt version.
No arguments are required.
int — a value of this type
rom_phy_functionspub fn rom_phy_functions() intRom phy functions.
No arguments are required.
int — a value of this type
smp_aes128_lepub fn smp_aes128_le(key &[]int, block &[]int) []intEncrypt one BLE e(k, plaintext) block. Key, plaintext and result are exactly 16 octets, least-significant byte first. Empty result signals invalid input, hardware configuration failure or the bounded timeout. No software AES tables are linked and no key is cached between calls.
key &[]intblock &[]int[]int — slice result
struct SpiBuspub struct SpiBus {
pub sck_pin int
pub mosi_pin int
pub miso_pin int
pub cs_pin int
pub sck_mask int
pub mosi_mask int
pub cs_mask int
}Structure encapsulating sck_pin, mosi_pin, miso_pin, cs_pin, sck_mask.
sck_pin intmosi_pin intmiso_pin intcs_pin intsck_mask intmosi_mask intcs_mask intspi_initpub fn spi_init(sck int, mosi int, miso int, cs int) SpiBusSpi init.
sck intmosi intmiso intcs intSpiBus — a value of this type
(&SpiBus) cs_lowpub fn (bus &SpiBus) cs_low()Operation on &SpiBus: cs low.
bus &SpiBusSpiBus instance used by this call (borrow).This call does not return a value.
(&SpiBus) cs_highpub fn (bus &SpiBus) cs_high()Operation on &SpiBus: cs high.
bus &SpiBusSpiBus instance used by this call (borrow).This call does not return a value.
(&SpiBus) write_bytepub fn (bus &SpiBus) write_byte(b int)Operation on &SpiBus: write one byte.
bus &SpiBusSpiBus instance used by this call (borrow).b intThis call does not return a value.
(&SpiBus) write_wordpub fn (bus &SpiBus) write_word(w int)Operation on &SpiBus: write word.
bus &SpiBusSpiBus instance used by this call (borrow).w intThis call does not return a value.
(&SpiBus) write_fillpub fn (bus &SpiBus) write_fill(val16 int, count int)Operation on &SpiBus: write fill.
bus &SpiBusSpiBus instance used by this call (borrow).val16 intcount intThis call does not return a value.
delay_cyclespub fn delay_cycles(cycles int)Delay cycles.
cycles intThis call does not return a value.
delay_uspub fn delay_us(us int)Delay us.
us intThis call does not return a value.
delay_mspub fn delay_ms(ms int)Delay ms.
ms intThis call does not return a value.
uart_write_charpub fn uart_write_char(ch int)Uart write char.
ch intThis call does not return a value.
uart_rx_availablepub fn uart_rx_available() boolUart rx available.
No arguments are required.
bool — true or false
uart_read_charpub fn uart_read_char() intUart read char.
No arguments are required.
int — a value of this type
uart_writepub fn uart_write(s string)Uart write.
s stringThis call does not return a value.
uart_printpub fn uart_print(s string)Uart print.
s stringThis call does not return a value.
uart_printlnpub fn uart_println(s string)Uart println.
s stringThis call does not return a value.
uart_print_intpub fn uart_print_int(n int)Uart print int.
n intThis call does not return a value.
uart_println_intpub fn uart_println_int(n int)Uart println int.
n intThis call does not return a value.
uart_print_hexpub fn uart_print_hex(n int)Uart print hex.
n intThis call does not return a value.
wdt_disablepub fn wdt_disable()Wdt disable.
No arguments are required.
This call does not return a value.
wdt_feedpub fn wdt_feed()Wdt feed.
No arguments are required.
This call does not return a value.
initpub fn init()Global initialization for ESP32 hardware
No arguments are required.
This call does not return a value.
const WIFI_MODE_NULLpub const WIFI_MODE_NULL = 0Wi-Fi Operating Modes
const WIFI_MODE_STApub const WIFI_MODE_STA = 1Constant WIFI_MODE_STA, defining protocol or algorithm parameters.
const WIFI_MODE_APpub const WIFI_MODE_AP = 2Constant WIFI_MODE_AP, defining protocol or algorithm parameters.
const WIFI_MODE_APSTApub const WIFI_MODE_APSTA = 3Constant WIFI_MODE_APSTA, defining protocol or algorithm parameters.
const WIFI_AUTH_UNKNOWNpub const WIFI_AUTH_UNKNOWN = -1Wi-Fi Authentication Modes
const WIFI_AUTH_OPENpub const WIFI_AUTH_OPEN = 0Constant WIFI_AUTH_OPEN, defining protocol or algorithm parameters.
const WIFI_AUTH_WEPpub const WIFI_AUTH_WEP = 1Constant WIFI_AUTH_WEP, defining protocol or algorithm parameters.
const WIFI_AUTH_WPA_PSKpub const WIFI_AUTH_WPA_PSK = 2Constant WIFI_AUTH_WPA_PSK, defining protocol or algorithm parameters.
const WIFI_AUTH_WPA2_PSKpub const WIFI_AUTH_WPA2_PSK = 3Constant WIFI_AUTH_WPA2_PSK, defining protocol or algorithm parameters.
const WIFI_AUTH_WPA_WPA2_PSKpub const WIFI_AUTH_WPA_WPA2_PSK = 4Constant WIFI_AUTH_WPA_WPA2_PSK, defining protocol or algorithm parameters.
const WIFI_AUTH_WPA3_PSKpub const WIFI_AUTH_WPA3_PSK = 5Constant WIFI_AUTH_WPA3_PSK, defining protocol or algorithm parameters.
const WIFI_STATUS_IDLEpub const WIFI_STATUS_IDLE = 0Wi-Fi Connection States
const WIFI_STATUS_SCANNINGpub const WIFI_STATUS_SCANNING = 1Constant WIFI_STATUS_SCANNING, defining protocol or algorithm parameters.
const WIFI_STATUS_CONNECTINGpub const WIFI_STATUS_CONNECTING = 2Constant WIFI_STATUS_CONNECTING, defining protocol or algorithm parameters.
const WIFI_STATUS_CONNECTEDpub const WIFI_STATUS_CONNECTED = 3Constant WIFI_STATUS_CONNECTED, defining protocol or algorithm parameters.
const WIFI_STATUS_DISCONNECTEDpub const WIFI_STATUS_DISCONNECTED = 4Constant WIFI_STATUS_DISCONNECTED, defining protocol or algorithm parameters.
const WIFI_STATUS_AP_ACTIVEpub const WIFI_STATUS_AP_ACTIVE = 5Constant WIFI_STATUS_AP_ACTIVE, defining protocol or algorithm parameters.
const WIFI_STATUS_ERRORpub const WIFI_STATUS_ERROR = 6Constant WIFI_STATUS_ERROR, defining protocol or algorithm parameters.
const DPORT_WIFI_CLK_EN_REGpub const DPORT_WIFI_CLK_EN_REG = 0x3FF000CCWi-Fi Hardware Baseband & DPORT Power Domain Registers
const DPORT_CORE_RST_EN_REGpub const DPORT_CORE_RST_EN_REG = 0x3FF000D0Constant DPORT_CORE_RST_EN_REG, defining protocol or algorithm parameters.
const DPORT_WIFI_RST_EN_REGpub const DPORT_WIFI_RST_EN_REG = 0x3FF000D0Constant DPORT_WIFI_RST_EN_REG, defining protocol or algorithm parameters.
const DPORT_WIFI_CLK_WIFI_ENpub const DPORT_WIFI_CLK_WIFI_EN = 0x00000406Constant DPORT_WIFI_CLK_WIFI_EN, defining protocol or algorithm parameters.
dhcp_lease_ippub fn dhcp_lease_ip(subnet int, slot int) stringNo DHCP client/server has provided a lease yet. Preserve API compatibility.
subnet intslot intstring — result string
dhcp_gatewaypub fn dhcp_gateway(subnet int) stringDhcp gateway.
subnet intstring — result string
struct WifiApConfigpub struct WifiApConfig {
pub ssid string
pub password string
pub channel int
pub authmode int
pub max_connections int
pub hidden bool
}Esp32 Configuration parameters and options set.
ssid stringpassword stringchannel intauthmode intmax_connections inthidden boolstruct WifiStaConfigpub struct WifiStaConfig {
pub ssid string
pub password string
pub channel int
pub authmode int
}Esp32 Configuration parameters and options set.
ssid stringpassword stringchannel intauthmode intstruct WifiScanResultpub struct WifiScanResult {
pub ssid string
pub rssi int
pub channel int
pub authmode int
pub bssid string
}Structure encapsulating ssid, rssi, channel, authmode, bssid.
ssid stringrssi intchannel intauthmode intbssid stringstruct WifiBackendpub struct WifiBackend {
pub initialize fn($&session.State) bool
pub connect fn($&session.State, &string, &string, int) bool
pub service fn($&session.State, int) bool
pub disconnect fn($&session.State)
pub ping_gateway fn($&session.State, int) bool
}Structure encapsulating initialize, connect, service, disconnect, ping_gateway.
initialize fn($&session.State) boolconnect fn($&session.State, &string, &string, int) boolservice fn($&session.State, int) booldisconnect fn($&session.State)ping_gateway fn($&session.State, int) boolwifi_default_backendpub fn wifi_default_backend() WifiBackendWifi default backend.
No arguments are required.
WifiBackend — a value of this type
struct WifiDevicepub struct WifiDevice {
pub backend WifiBackend
pub session session.State
pub mode int
pub status int
pub ssid string
pub password string
pub ip string
pub gateway string
pub netmask string
pub dns string
pub mac string
pub channel int
pub rssi int
pub ap_active bool
pub sta_connected bool
pub dhcp_enabled bool
pub static_ip string
pub static_gateway string
pub static_netmask string
pub static_dns string
pub ap_client_pool_next int
}Structure encapsulating backend, session, mode, status, ssid.
backend WifiBackendsession session.Statemode intstatus intssid stringpassword stringip stringgateway stringnetmask stringdns stringmac stringchannel intrssi intap_active boolsta_connected booldhcp_enabled boolstatic_ip stringstatic_gateway stringstatic_netmask stringstatic_dns stringap_client_pool_next intwifi_createpub fn wifi_create() WifiDeviceWifi create.
No arguments are required.
WifiDevice — a value of this type
($&WifiDevice) initpub fn (dev $&WifiDevice) init() boolInitialize internal state and default parameters.
dev $&WifiDeviceWifiDevice instance used by this call (exclusive borrow).bool — true or false
($&WifiDevice) install_backendpub fn (dev $&WifiDevice) install_backend(backend WifiBackend) boolOperation on $&WifiDevice: install backend.
dev $&WifiDeviceWifiDevice instance used by this call (exclusive borrow).backend WifiBackendbool — true or false
($&WifiDevice) pollpub fn (dev $&WifiDevice) poll(wait_ms int) boolCall regularly from the application loop; this backend has no OS thread.
dev $&WifiDeviceWifiDevice instance used by this call (exclusive borrow).wait_ms intbool — true or false
($&WifiDevice) ping_gatewaypub fn (dev $&WifiDevice) ping_gateway(timeout_ms int) boolOperation on $&WifiDevice: ping gateway.
dev $&WifiDeviceWifiDevice instance used by this call (exclusive borrow).timeout_ms intbool — true or false
($&WifiDevice) set_modepub fn (dev $&WifiDevice) set_mode(mode int)Operation on $&WifiDevice: set mode.
dev $&WifiDeviceWifiDevice instance used by this call (exclusive borrow).mode intThis call does not return a value.
($&WifiDevice) config_static_ippub fn (dev $&WifiDevice) config_static_ip(ip string, gateway string, netmask string, dns string)Configure static IP (disables automatic DHCP)
dev $&WifiDeviceWifiDevice instance used by this call (exclusive borrow).ip stringgateway stringnetmask stringdns stringThis call does not return a value.
($&WifiDevice) config_dhcppub fn (dev $&WifiDevice) config_dhcp(enable bool)Enable or disable dynamic DHCP client
dev $&WifiDeviceWifiDevice instance used by this call (exclusive borrow).enable boolThis call does not return a value.
($&WifiDevice) start_appub fn (dev $&WifiDevice) start_ap(ssid string, password string, channel int) boolStart Wi-Fi Access Point (SoftAP) with default subnet
dev $&WifiDeviceWifiDevice instance used by this call (exclusive borrow).ssid stringpassword stringchannel intbool — true or false
($&WifiDevice) start_ap_ippub fn (dev $&WifiDevice) start_ap_ip(ssid string, password string, channel int, ap_ip string, gateway string) boolStart Wi-Fi Access Point (SoftAP) with custom IP configuration
dev $&WifiDeviceWifiDevice instance used by this call (exclusive borrow).ssid stringpassword stringchannel intap_ip stringgateway stringbool — true or false
($&WifiDevice) allocate_client_ippub fn (dev $&WifiDevice) allocate_client_ip() stringNo address can be leased without an active DHCP server.
dev $&WifiDeviceWifiDevice instance used by this call (exclusive borrow).string — result string
($&WifiDevice) connectpub fn (dev $&WifiDevice) connect(ssid string, password string) boolConnect to target Wi-Fi AP (Station mode) with dynamic DHCP or static IP
dev $&WifiDeviceWifiDevice instance used by this call (exclusive borrow).ssid stringpassword stringbool — true or false
($&WifiDevice) connect_timeoutpub fn (dev $&WifiDevice) connect_timeout(ssid string, password string, timeout_ms int) boolOperation on $&WifiDevice: connect timeout.
dev $&WifiDeviceWifiDevice instance used by this call (exclusive borrow).ssid stringpassword stringtimeout_ms intbool — true or false
($&WifiDevice) disconnectpub fn (dev $&WifiDevice) disconnect()Disconnect from currently connected Wi-Fi network
dev $&WifiDeviceWifiDevice instance used by this call (exclusive borrow).This call does not return a value.
($&WifiDevice) reconnectpub fn (dev $&WifiDevice) reconnect() boolReconnect to previously saved network
dev $&WifiDeviceWifiDevice instance used by this call (exclusive borrow).bool — true or false
(&WifiDevice) is_connectedpub fn (dev &WifiDevice) is_connected() boolCheck whether Station is currently connected to an AP
dev &WifiDeviceWifiDevice instance used by this call (borrow).bool — true or false
(&WifiDevice) get_ippub fn (dev &WifiDevice) get_ip() stringGet assigned IP address string
dev &WifiDeviceWifiDevice instance used by this call (borrow).string — result string
(&WifiDevice) get_gatewaypub fn (dev &WifiDevice) get_gateway() stringGet gateway IP address string
dev &WifiDeviceWifiDevice instance used by this call (borrow).string — result string
(&WifiDevice) get_netmaskpub fn (dev &WifiDevice) get_netmask() stringGet netmask string
dev &WifiDeviceWifiDevice instance used by this call (borrow).string — result string
(&WifiDevice) get_dnspub fn (dev &WifiDevice) get_dns() stringGet DNS server IP string
dev &WifiDeviceWifiDevice instance used by this call (borrow).string — result string
(&WifiDevice) has_rssipub fn (dev &WifiDevice) has_rssi() boolNo calibrated RSSI is supplied by the fixed-profile backend yet.
dev &WifiDeviceWifiDevice instance used by this call (borrow).bool — true or false
(&WifiDevice) get_rssipub fn (dev &WifiDevice) get_rssi() intLegacy getter; check has_rssi before interpreting this value.
dev &WifiDeviceWifiDevice instance used by this call (borrow).int — a value of this type
(&WifiDevice) get_ssidpub fn (dev &WifiDevice) get_ssid() stringGet SSID
dev &WifiDeviceWifiDevice instance used by this call (borrow).string — result string
($&WifiDevice) scanpub fn (dev $&WifiDevice) scan() intScan for available 2.4GHz Wi-Fi networks (returns number of detected networks)
dev $&WifiDeviceWifiDevice instance used by this call (exclusive borrow).int — a value of this type
(&WifiDevice) scan_get_ssidpub fn (dev &WifiDevice) scan_get_ssid(idx int) stringGet scanned network SSID by index
dev &WifiDeviceWifiDevice instance used by this call (borrow).idx intstring — result string
(&WifiDevice) scan_get_rssipub fn (dev &WifiDevice) scan_get_rssi(idx int) intGet scanned network RSSI signal in dBm by index
dev &WifiDeviceWifiDevice instance used by this call (borrow).idx intint — a value of this type
(&WifiDevice) scan_get_channelpub fn (dev &WifiDevice) scan_get_channel(idx int) intGet scanned network channel by index
dev &WifiDeviceWifiDevice instance used by this call (borrow).idx intint — a value of this type
(&WifiDevice) scan_get_authpub fn (dev &WifiDevice) scan_get_auth(idx int) intGet scanned network authentication mode by index
dev &WifiDeviceWifiDevice instance used by this call (borrow).idx intint — a value of this type
(&WifiDevice) scan_get_auth_strpub fn (dev &WifiDevice) scan_get_auth_str(idx int) stringGet scanned network authentication mode name string by index
dev &WifiDeviceWifiDevice instance used by this call (borrow).idx intstring — result string
(&WifiDevice) scan_get_bssidpub fn (dev &WifiDevice) scan_get_bssid(idx int) stringGet scanned network BSSID MAC by index
dev &WifiDeviceWifiDevice instance used by this call (borrow).idx intstring — result string
(&WifiDevice) get_scan_resultpub fn (dev &WifiDevice) get_scan_result(idx int) WifiScanResultGet scanned network item as a value struct
dev &WifiDeviceWifiDevice instance used by this call (borrow).idx intWifiScanResult — a value of this type
(&WifiDevice) print_scan_listpub fn (dev &WifiDevice) print_scan_list(count int)Print formatted Wi-Fi scan list to UART console
dev &WifiDeviceWifiDevice instance used by this call (borrow).count intThis call does not return a value.
authmode_to_stringpub fn authmode_to_string(auth int) stringAuthmode to string.
auth intstring — result string
(&WifiDevice) get_status_strpub fn (dev &WifiDevice) get_status_str() stringOperation on &WifiDevice: read status str.
dev &WifiDeviceWifiDevice instance used by this call (borrow).string — result string
wifi_phy_coexist_enablepub fn wifi_phy_coexist_enable(channel int) boolWifi phy coexist enable.
channel intbool — true or false
wifi_coexist_pause_receivepub fn wifi_coexist_pause_receive() intCache-off flash work requires BLE disconnected, advertising stopped, the event list empty and all PRO IRQs masked by the caller. Pause DMA without revoking the station lease/keys; the caller must resume with this token.
No arguments are required.
int — a value of this type
wifi_coexist_resume_receivepub fn wifi_coexist_resume_receive(saved int) boolWifi coexist resume receive.
saved intbool — true or false
wifi_phy_calibratepub fn wifi_phy_calibrate() boolWifi phy calibrate.
No arguments are required.
bool — true or false
wifi_phy_selectpub fn wifi_phy_select(channel int) boolWifi phy select.
channel intbool — true or false