LoaderOptions object argument for ESPLoader.
const myLoader = new ESPLoader({ transport: Transport, baudrate: number, terminal?: IEspLoaderTerminal });
Private
baudrateGet the checksum for given unsigned 8-bit array
Unsigned 8-bit integer array
Private
debugGet flash size bytes from flash size string.
Flash Size string
Flash size bytes
Private
romPrivate
Optional
serialPrivate
syncPrivate
Optional
terminalScale timeouts which are size-specific.
Seconds per megabytes as number
Size bytes number
Attempt to connect to the chip by sending a reset sequence and later a sync command.
Reset mode to use
Enable delay for ESP32 R0
Update the image flash parameters with given arguments.
binary image as string
flash address number
Flash size string
Flash mode string
Flash frequency string
modified image string
Execute the command and check the command response.
Command operation description.
Command operation number
Command value
Checksum to use
TImeout number in milliseconds (ms)
Command result
Write a serial command to the chip
Operation number
Unsigned 8 bit array
channel number
wait for response ?
timeout number in milliseconds
Return a number and a 8 bit unsigned integer array.
Perform a connection to chip.
Reset mode to use. Example: 'default_reset' | 'no_reset'
Number of connection attempts
Detect the connected chip
Start downloading compressed data to Flash (performs an erase)
Write size
Compressed size
Offset for write
Returns number of blocks (size self.FLASH_WRITE_SIZE) to write.
Use the device serial port read function with given timeout to create a valid packet.
Operation number
timeout number in milliseconds
valid response packet.
Run an arbitrary SPI flash command.
This function uses the "USR_COMMAND" functionality in the ESP SPI hardware, rather than the precanned commands supported by hardware. So the value of spiflashCommand is an actual command byte, sent over the wire.
After writing command byte, writes 'data' to MOSI and then reads back 'readBits' of reply on MISO. Result is a number.
Command to execute in SPI
Data to send
Number of bits to read
Register SPI_W0_REG value
Write set of file images into given address based on given FlashOptions object.
FlashOptions to configure how and what to write into flash.
Write a number value to register address in chip.
Register address number
Number value to write in register
Hex number for mask
Delay number
Delay after previous delay
Generated using TypeDoc
Create a new ESPLoader to perform serial communication such as read/write flash memory and registers using a LoaderOptions object.