Home
last modified time | relevance | path

Searched refs:eeprom_fd (Results 1 – 3 of 3) sorted by relevance

/Zephyr-latest/drivers/eeprom/
Deeprom_simulator_native.c35 int *eeprom_fd, const char *eeprom_file_path, unsigned int erase_value, in eeprom_mock_init_native() argument
49 *eeprom_fd = open(eeprom_file_path, O_RDWR | O_CREAT, (mode_t)0600); in eeprom_mock_init_native()
50 if (*eeprom_fd == -1) { in eeprom_mock_init_native()
56 rc = fstat(*eeprom_fd, &f_stat); in eeprom_mock_init_native()
63 if (ftruncate(*eeprom_fd, size) == -1) { 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()
90 void eeprom_mock_cleanup_native(bool eeprom_in_ram, int eeprom_fd, char *mock_eeprom, in eeprom_mock_cleanup_native() argument
106 if (eeprom_fd != -1) { in eeprom_mock_cleanup_native()
107 close(eeprom_fd); in eeprom_mock_cleanup_native()
Deeprom_simulator_native.h17 int *eeprom_fd, const char *eeprom_file_path, unsigned int erase_value,
20 void eeprom_mock_cleanup_native(bool eeprom_in_ram, int eeprom_fd, char *mock_eeprom,
Deeprom_simulator.c83 static int eeprom_fd = -1; variable
224 rc = eeprom_mock_init_native(eeprom_in_ram, &mock_eeprom, DT_INST_PROP(0, size), &eeprom_fd, 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()