mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-02 15:32:34 +00:00
For the parts of the simulator which are dedicated for the native platforms (POSIX arch based): * Refactor the parts that interacts with the host, so it is possible to use it also with embedded libCs * Enhance it with more options to allow: * Keeping the content just in RAM * Erasing the EEPROM file at exit * Clearing the file at boot * Also show in the command line help the default file name. As part of this: * Update the kconfig dependencies, so we allow building it with other C libraries in the native targets * Update the table in the native_sim docs to indicate all C libraries are supproted now Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
29 lines
713 B
C
29 lines
713 B
C
/*
|
|
* Copyright (c) 2024 Nordic Semiconductor ASA
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#ifndef DRIVERS_EEPROM_EEPROM_SIMULATOR_NATIVE_H
|
|
#define DRIVERS_EEPROM_EEPROM_SIMULATOR_NATIVE_H
|
|
|
|
#include <stdbool.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
int eeprom_mock_init_native(bool eeprom_in_ram, char **mock_eeprom, unsigned int size,
|
|
int *eeprom_fd, const char *eeprom_file_path, unsigned int erase_value,
|
|
bool eeprom_erase_at_start);
|
|
|
|
void eeprom_mock_cleanup_native(bool eeprom_in_ram, int eeprom_fd, char *mock_eeprom,
|
|
unsigned int size, const char *eeprom_file_path,
|
|
bool eeprom_rm_at_exit);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* DRIVERS_EEPROM_EEPROM_SIMULATOR_NATIVE_H */
|