Searched refs:mock_flash (Results 1 – 3 of 3) sorted by relevance
/Zephyr-Core-3.6.0/drivers/flash/ |
D | flash_simulator_native.c | 38 int flash_mock_init_native(bool flash_in_ram, uint8_t **mock_flash, unsigned int size, in flash_mock_init_native() argument 46 *mock_flash = (uint8_t *)malloc(size); in flash_mock_init_native() 47 if (*mock_flash == NULL) { in flash_mock_init_native() 76 *mock_flash = mmap(NULL, size, in flash_mock_init_native() 78 if (*mock_flash == MAP_FAILED) { in flash_mock_init_native() 88 (void)memset(*mock_flash, erase_value, size); in flash_mock_init_native() 99 void flash_mock_cleanup_native(bool flash_in_ram, int flash_fd, uint8_t *mock_flash, in flash_mock_cleanup_native() argument 105 if (mock_flash != NULL) { in flash_mock_cleanup_native() 106 free(mock_flash); in flash_mock_cleanup_native() 111 if ((mock_flash != MAP_FAILED) && (mock_flash != NULL)) { in flash_mock_cleanup_native() [all …]
|
D | flash_simulator_native.h | 14 int flash_mock_init_native(bool flash_in_ram, uint8_t **mock_flash, unsigned int size, 18 void flash_mock_cleanup_native(bool flash_in_ram, int flash_fd, uint8_t *mock_flash,
|
D | flash_simulator.c | 51 #define MOCK_FLASH(addr) (mock_flash + (addr) - FLASH_SIMULATOR_BASE_OFFSET) 144 static uint8_t *mock_flash; variable 155 static uint8_t mock_flash[FLASH_SIMULATOR_FLASH_SIZE] Z_GENERIC_SECTION(FLASH_SIMULATOR_MREGION); 157 static uint8_t mock_flash[FLASH_SIMULATOR_FLASH_SIZE]; variable 385 rc = flash_mock_init_native(flash_in_ram, &mock_flash, FLASH_SIMULATOR_FLASH_SIZE, in flash_mock_init() 407 memset(mock_flash, FLASH_SIMULATOR_ERASE_VALUE, ARRAY_SIZE(mock_flash)); in flash_mock_init() 429 flash_mock_cleanup_native(flash_in_ram, flash_fd, mock_flash, in flash_native_posix_cleanup() 479 return mock_flash; in z_impl_flash_simulator_get_memory()
|