esptest.adapter.dut.esp_mixin module
- class esptest.adapter.dut.esp_mixin.EspSerial(esp)[source]
Bases:
objectAdd RawPort methods to esp serial
- Parameters:
esp (ESPLoader)
- property esp: ESPLoader
- class esptest.adapter.dut.esp_mixin.EspMixin(*args, **kwargs)[source]
Bases:
object- property esp: ESPLoader
- change_serial_config(**kwargs)[source]
Change the underlying serial config (baudrate/timeout/parity/…).
For an esptool-backed port the settings are applied to the esp serial port; otherwise the request is delegated to the serial port proxy. Only settings supported by pyserial
apply_settingstake effect.- Parameters:
kwargs (Any)
- Return type:
None
- download_bin(erase_nvs=True, *, bin_path='', baud=0, force_no_stub=False, log_port_baudrate=0)[source]
Download bin to the dut. Note: this method will update downbin_tool attribute.
- Parameters:
erase_nvs (bool, optional) – Whether to erase nvs before flashing.
bin_path (str, optional) – Path to the bin file, overwrite the bin_path attribute if provided.
baud (Union[int, List[int]], optional) – Download baud rate to use. If given a list, will try each baud rate in order.
force_no_stub (bool, optional) – Whether to force no stub.
log_port_baudrate (int, optional) – If > 0, set the log/monitor serial port baud rate after downloading.
- Return type:
None