Searched refs:mock_eeprom (Results 1 – 3 of 3) sorted by relevance
/Zephyr-latest/drivers/eeprom/ |
D | eeprom_simulator_native.c | 34 int eeprom_mock_init_native(bool eeprom_in_ram, char **mock_eeprom, unsigned int size, in eeprom_mock_init_native() argument 42 *mock_eeprom = (char *)malloc(size); in eeprom_mock_init_native() 43 if (*mock_eeprom == NULL) { in eeprom_mock_init_native() 69 *mock_eeprom = mmap(NULL, size, PROT_WRITE | PROT_READ, MAP_SHARED, *eeprom_fd, 0); in eeprom_mock_init_native() 70 if (*mock_eeprom == MAP_FAILED) { in eeprom_mock_init_native() 79 (void)memset(*mock_eeprom, erase_value, size); in eeprom_mock_init_native() 90 void eeprom_mock_cleanup_native(bool eeprom_in_ram, int eeprom_fd, char *mock_eeprom, in eeprom_mock_cleanup_native() argument 96 if (mock_eeprom != NULL) { in eeprom_mock_cleanup_native() 97 free(mock_eeprom); in eeprom_mock_cleanup_native() 102 if ((mock_eeprom != MAP_FAILED) && (mock_eeprom != NULL)) { in eeprom_mock_cleanup_native() [all …]
|
D | eeprom_simulator_native.h | 16 int eeprom_mock_init_native(bool eeprom_in_ram, char **mock_eeprom, unsigned int size, 20 void eeprom_mock_cleanup_native(bool eeprom_in_ram, int eeprom_fd, char *mock_eeprom,
|
D | eeprom_simulator.c | 35 #define EEPROM(addr) (mock_eeprom + (addr)) 82 static char *mock_eeprom; variable 90 static uint8_t mock_eeprom[DT_INST_PROP(0, size)]; variable 224 rc = eeprom_mock_init_native(eeprom_in_ram, &mock_eeprom, DT_INST_PROP(0, size), &eeprom_fd, in eeprom_mock_init() 238 memset(mock_eeprom, 0xFF, ARRAY_SIZE(mock_eeprom)); in eeprom_mock_init() 261 eeprom_mock_cleanup_native(eeprom_in_ram, eeprom_fd, mock_eeprom, DT_INST_PROP(0, size), in eeprom_native_cleanup()
|