:mod:`esp` --- ESP32-specific Functions ========================================================= .. module:: esp :synopsis: ESP32-specific functions The ``esp`` module contains functions specific to the ESP32 module. Functions --------- .. function:: flash_size() Returns the flash size. .. function:: flash_user_start() Returns the memory offset where the user flash space starts. .. function:: flash_read(byte_offset, length_or_buffer) Reads data of buf.len() length from the flash starting at address byte_offset and stores it in buf. - ``byte_offset``: Flash offset address - ``buf``: Receive data buffer, buffer length is len :: import esp buf = bytearray(100) esp.flash_read(2097152, buf) .. function:: flash_write(byte_offset, bytes) Writes all data in buf to the flash area at address byte_offset. - ``byte_offset``: Flash offset address - ``buf``: Data buffer, buffer length is len :: buf = bytearray(100) esp.flash_write(2097152, buf) .. function:: flash_erase(sector_no) Erase a flash sector. - ``sector_no``: The sector to erase :: esp.flash_erase(512) .. function:: osdebug()