Lines Matching refs:mock_flash
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()
112 munmap(mock_flash, size); in flash_mock_cleanup_native()