Home
last modified time | relevance | path

Searched refs:sector_size (Results 1 – 25 of 58) sorted by relevance

123

/hal_espressif-3.4.0/components/wear_levelling/test_wl_host/
Dtest_wl.cpp15 extern "C" void _spi_flash_init(const char* chip_size, size_t block_size, size_t sector_size, size_…
35 uint32_t sector_size = wl_sector_size(wl_handle); variable
36 REQUIRE(sector_size == CONFIG_WL_SECTOR_SIZE);
41 uint32_t sectors = partition->size / sector_size;
46 uint32_t sector_address = sector * sector_size;
48 for(uint32_t i = 0; i < sector_size / sizeof(i); i++)
66 result = wl_erase_range(wl_handle, 0, sector_size);
68 result = wl_erase_range(wl_handle, 12288, sector_size * 2);
70 result = wl_erase_range(wl_handle, 28672, sector_size * 3);
74 memset(data + 0, 0xFF, sector_size);
[all …]
/hal_espressif-3.4.0/components/wear_levelling/test/
Dtest_wl.c140 size_t sector_size = wl_sector_size(handle);
141 TEST_ESP_OK(wl_erase_range(handle, 0, sector_size * 8));
142 …read_write_test_arg_t args1 = READ_WRITE_TEST_ARG_INIT(0, 1, handle, sector_size/sizeof(uint32_t));
143 …read_write_test_arg_t args2 = READ_WRITE_TEST_ARG_INIT(sector_size, 2, handle, sector_size/sizeof(…
161 …read_write_test_arg_t args3 = READ_WRITE_TEST_ARG_INIT(2 * sector_size, 3, handle, sector_size/siz…
162 …read_write_test_arg_t args4 = READ_WRITE_TEST_ARG_INIT(3 * sector_size, 4, handle, sector_size/siz…
194 size_t sector_size = wl_sector_size(handle); in check_mem_data() local
197 TEST_ESP_OK(wl_read(handle, sector_size * m, buff, sector_size)); in check_mem_data()
198 for (int i=0 ; i< sector_size/sizeof(uint32_t) ; i++) { in check_mem_data()
199 uint32_t compare_val = init_val + i + m*sector_size; in check_mem_data()
[all …]
/hal_espressif-3.4.0/components/nvs_flash/host_test/fixtures/
Dtest_fixtures.hpp100 uint32_t sector_size = 1, in EncryptedPartitionFixture()
102 : esp_partition(), emu(start_sector + sector_size), in EncryptedPartitionFixture()
105 esp_partition.size = sector_size * SPI_FLASH_SEC_SIZE; in EncryptedPartitionFixture()
121 uint32_t sector_size = 1, in PartitionMockFixture()
123 : part_mock(start_sector * SPI_FLASH_SEC_SIZE, sector_size * SPI_FLASH_SEC_SIZE) { in PartitionMockFixture()
139 uint32_t sector_size = 1, in NVSPageFixture()
141 : PartitionMockFixture(start_sector, sector_size, partition_name), page() in NVSPageFixture()
171 uint32_t sector_size = 1, in NVSValidPageFlashFixture()
173 : PartitionMockFixture(start_sector, sector_size, partition_name), in NVSValidPageFlashFixture()
212 uint32_t sector_size = 1, in NVSValidPageFixture()
[all …]
/hal_espressif-3.4.0/examples/peripherals/usb/host/msc/components/msc/src/
Ddiskio_usb.c37 size_t sector_size = disk->block_size; in usb_disk_read() local
41 err = scsi_cmd_read10(dev, &buff[i * sector_size], sector + i, 1, sector_size); in usb_disk_read()
59 size_t sector_size = disk->block_size; in usb_disk_write() local
63 err = scsi_cmd_write10(dev, &buff[i * sector_size], sector + i, 1, sector_size); in usb_disk_write()
Dmsc_scsi_bot.c318 uint32_t sector_size) in scsi_cmd_read10() argument
321 CBW_BASE_INIT(IN_DIR, CBW_CMD_SIZE(cbw_read10_t), num_sectors * sector_size), in scsi_cmd_read10()
328 return bot_execute_command(device, &cbw.base, data, num_sectors * sector_size); in scsi_cmd_read10()
335 uint32_t sector_size) in scsi_cmd_write10() argument
338 CBW_BASE_INIT(OUT_DIR, CBW_CMD_SIZE(cbw_write10_t), num_sectors * sector_size), in scsi_cmd_write10()
344 return bot_execute_command(device, &cbw.base, (void *)data, num_sectors * sector_size); in scsi_cmd_write10()
/hal_espressif-3.4.0/components/nvs_flash/test_nvs_host/
Dtest_fixtures.hpp116 uint32_t sector_size = 1, in PartitionEmulationFixture()
118 : emu(start_sector + sector_size), in PartitionEmulationFixture()
119 … part(&emu, start_sector * SPI_FLASH_SEC_SIZE, sector_size * SPI_FLASH_SEC_SIZE, partition_name) { in PartitionEmulationFixture()
132 uint32_t sector_size = 1, in EncryptedPartitionFixture()
134 : esp_partition(), emu(start_sector + sector_size), in EncryptedPartitionFixture()
137 esp_partition.size = sector_size * SPI_FLASH_SEC_SIZE; in EncryptedPartitionFixture()
/hal_espressif-3.4.0/components/wear_levelling/
DWL_Flash.cpp54 cfg->sector_size, in config()
74 if ((this->cfg.sector_size % this->cfg.temp_buff_size) != 0) { in config()
77 if (this->cfg.page_size < this->cfg.sector_size) { in config()
82 this->state_size = this->cfg.sector_size; in config()
83 …if (this->state_size < (sizeof(wl_state_t) + (this->cfg.full_mem_size / this->cfg.sector_size)*thi… in config()
84 …s->cfg.full_mem_size / this->cfg.sector_size) * this->cfg.wr_size) + this->cfg.sector_size - 1) / … in config()
85 this->state_size = this->state_size * this->cfg.sector_size; in config()
87 this->cfg_size = (sizeof(wl_config_t) + this->cfg.sector_size - 1) / this->cfg.sector_size; in config()
88 this->cfg_size = cfg_size * this->cfg.sector_size; in config()
164 …for (size_t i = 0; i < ((this->cfg.full_mem_size / this->cfg.sector_size)*this->cfg.wr_size); i++)… in init()
[all …]
DWL_Ext_Perf.cpp41 this->flash_sector_size = cfg->sector_size; in config()
43 this->sector_buffer = (uint32_t *)malloc(cfg->sector_size); in config()
65 size_t WL_Ext_Perf::sector_size() in sector_size() function in WL_Ext_Perf
DWL_Ext_Safe.cpp62 this->state_addr = WL_Flash::chip_size() - 2 * WL_Flash::sector_size(); in config()
63 this->dump_addr = WL_Flash::chip_size() - 1 * WL_Flash::sector_size(); in config()
/hal_espressif-3.4.0/components/esptool_py/esptool/esptool/targets/
Desp8266.py155 sector_size = self.FLASH_SECTOR_SIZE
156 num_sectors = (size + sector_size - 1) // sector_size
157 start_sector = offset // sector_size
164 return (num_sectors + 1) // 2 * sector_size
166 return (num_sectors - head_sectors) * sector_size
/hal_espressif-3.4.0/components/spi_flash/sim/
DSpiFlash.cpp42 void SpiFlash::init(uint32_t chip_size, uint32_t block_size, uint32_t sector_size, uint32_t page_si… in init() argument
50 this->sector_size = sector_size; in init()
54 this->sectors = DIV_AND_CEIL(this->chip_size, this->sector_size); in init()
104 return this->sector_size; in get_sector_size()
114 uint32_t sectors_per_block = (this->block_size / this->sector_size); in erase_block()
136 uint32_t pages_per_sector = (this->sector_size / this->page_size); in erase_sector()
Dflash_mock.cpp40 extern "C" void _spi_flash_init(const char* chip_size, size_t block_size, size_t sector_size, size_… in _spi_flash_init() argument
46 spiflash.init(size, block_size, sector_size, page_size, partitions_bin); in _spi_flash_init()
50 g_rom_flashchip.sector_size = sector_size; in _spi_flash_init()
DSpiFlash.h34 …void init(uint32_t chip_size, uint32_t block_size, uint32_t sector_size, uint32_t page_size, const…
62 uint32_t sector_size; variable
/hal_espressif-3.4.0/components/fatfs/vfs/
Dvfs_fat_internal.h22 size_t sector_size, size_t requested_size) in esp_vfs_fat_get_allocation_unit_size() argument
26 const size_t max_size = sector_size * max_sectors_per_cylinder; in esp_vfs_fat_get_allocation_unit_size()
27 alloc_unit_size = MAX(alloc_unit_size, sector_size); in esp_vfs_fat_get_allocation_unit_size()
/hal_espressif-3.4.0/components/spi_flash/esp32/
Dspi_flash_rom_patch.c468 if (sector_num >= ((g_rom_spiflash_chip.chip_size) / (g_rom_spiflash_chip.sector_size))) { in esp_rom_spiflash_erase_sector()
476 …lash_erase_sector_internal(&g_rom_spiflash_chip, sector_num * (g_rom_spiflash_chip.sector_size))) { in esp_rom_spiflash_erase_sector()
635 if (0 != (start_addr % g_rom_spiflash_chip.sector_size)) { in esp_rom_spiflash_erase_area()
644 sector_no = start_addr / g_rom_spiflash_chip.sector_size; in esp_rom_spiflash_erase_area()
645 sector_num_per_block = g_rom_spiflash_chip.block_size / g_rom_spiflash_chip.sector_size; in esp_rom_spiflash_erase_area()
646 …or_num = (0 == (area_len % g_rom_spiflash_chip.sector_size)) ? area_len / g_rom_spiflash_chip.sect… in esp_rom_spiflash_erase_area()
647 1 + (area_len / g_rom_spiflash_chip.sector_size); in esp_rom_spiflash_erase_area()
/hal_espressif-3.4.0/examples/peripherals/usb/host/msc/components/msc/private_include/
Dmsc_scsi_bot.h28 uint32_t sector_size);
34 uint32_t sector_size);
/hal_espressif-3.4.0/components/sdmmc/
Dsdmmc_cmd.c244 .arg = csd->sector_size, in sdmmc_send_cmd_set_blocklen()
359 size_t block_size = card->csd.sector_size; in sdmmc_write_sectors()
392 size_t block_size = card->csd.sector_size; in sdmmc_write_sectors_dma()
434 size_t block_size = card->csd.sector_size; in sdmmc_read_sectors()
467 size_t block_size = card->csd.sector_size; in sdmmc_read_sectors_dma()
Dsdmmc_mmc.c194 out_csd->sector_size = MIN(read_bl_size, 512); in sdmmc_mmc_decode_csd()
195 if (out_csd->sector_size < read_bl_size) { in sdmmc_mmc_decode_csd()
196 out_csd->capacity *= read_bl_size / out_csd->sector_size; in sdmmc_mmc_decode_csd()
Dsdmmc_common.c134 const size_t max_sdsc_capacity = UINT32_MAX / card->csd.sector_size + 1; in sdmmc_init_csd()
279 …fprintf(stream, "Size: %lluMB\n", ((uint64_t) card->csd.capacity) * card->csd.sector_size / (1024 … in sdmmc_card_print_info()
284 card->csd.sector_size, card->csd.capacity, card->csd.read_block_len); in sdmmc_card_print_info()
Dsdmmc_sd.c325 out_csd->sector_size = MIN(read_bl_size, 512); in sdmmc_decode_csd()
326 if (out_csd->sector_size < read_bl_size) { in sdmmc_decode_csd()
327 out_csd->capacity *= read_bl_size / out_csd->sector_size; in sdmmc_decode_csd()
/hal_espressif-3.4.0/examples/peripherals/usb/host/msc/main/
Dmsc_example_main.c44 uint64_t capacity = ((uint64_t)info->sector_size * info->sector_count) / megabyte; in print_device_info()
48 printf("\t Sector size: %u\n", info->sector_size); in print_device_info()
/hal_espressif-3.4.0/components/spi_flash/
Desp_flash_api.c544 uint32_t sector_size = chip->chip_drv->sector_size; in esp_flash_erase_region() local
546 if (sector_size == 0 || (block_erase_size % sector_size) != 0) { in esp_flash_erase_region()
552 if ((start % chip->chip_drv->sector_size) != 0 || (len % chip->chip_drv->sector_size) != 0) { in esp_flash_erase_region()
617 erase_addr += sector_size; in esp_flash_erase_region()
618 len_remain -= sector_size; in esp_flash_erase_region()
/hal_espressif-3.4.0/components/esp_rom/include/esp32/rom/
Dspi_flash.h153 uint32_t sector_size; member
375 … uint32_t sector_size, uint32_t page_size, uint32_t status_mask);
/hal_espressif-3.4.0/components/esp_rom/include/esp32s2/rom/
Dspi_flash.h149 uint32_t sector_size; member
371 … uint32_t sector_size, uint32_t page_size, uint32_t status_mask);
/hal_espressif-3.4.0/components/esp_rom/include/esp32c3/rom/
Dspi_flash.h108 uint32_t sector_size; member
330 uint32_t sector_size, uint32_t page_size, uint32_t status_mask);

123