'Tell the ESP bootloader the parameters of the chip
Corresponds to the "flashchip" data structure that the ROM
has in RAM.
\'size\' is in bytes.
All other flash parameters are currently hardcoded (on ESP8266
these are mostly ignored by ROM code, on ESP32 I\'m not sure.)'

def flash_set_parameters(self, size):

    fl_id = 0
    total_size = size
    block_size = (64 * 1024)
    sector_size = (4 * 1024)
    page_size = 256
    status_mask = 65535
    self.check_command('set    SPI    params', ESP32ROM.ESP_SPI_SET_PARAMS, struct.pack('<IIIIII', fl_id, total_size, block_size, sector_size, page_size, status_mask))
