6#ifndef __ZEPHYR_INCLUDE_DRIVERS__FLASH_SIMULATOR_H__
7#define __ZEPHYR_INCLUDE_DRIVERS__FLASH_SIMULATOR_H__
121#include <zephyr/syscalls/flash_simulator.h>
void flash_simulator_set_callbacks(const struct device *dev, const struct flash_simulator_cb *cb)
Set flash simulator callbacks.
int(* flash_simulator_erase_unit_cb_t)(const struct device *dev, off_t unit_offset)
Flash simulator erase unit callback type.
Definition flash_simulator.h:70
void * flash_simulator_get_memory(const struct device *dev, size_t *mock_size)
Obtain a pointer to the RAM buffer used but by the simulator.
int(* flash_simulator_write_byte_cb_t)(const struct device *dev, off_t offset, uint8_t data)
Flash simulator write byte callback type.
Definition flash_simulator.h:52
const struct flash_simulator_params * flash_simulator_get_params(const struct device *dev)
Get flash simulator parameters.
__INTPTR_TYPE__ off_t
Definition types.h:36
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Runtime device structure (in ROM) per driver instance.
Definition device.h:513
void * data
Address of the device instance private data.
Definition device.h:523
Flash simulator callbacks structure.
Definition flash_simulator.h:77
flash_simulator_write_byte_cb_t write_byte
Byte write callback.
Definition flash_simulator.h:78
flash_simulator_erase_unit_cb_t erase_unit
Unit erase callback.
Definition flash_simulator.h:79
Flash simulator parameters structure.
Definition flash_simulator.h:30
uint8_t erase_value
The value used to represent erased memory.
Definition flash_simulator.h:36
size_t base_offset
The base offset of the flash simulator.
Definition flash_simulator.h:32
size_t memory_size
The total size of the memory.
Definition flash_simulator.h:31
size_t prog_unit
The program unit size.
Definition flash_simulator.h:34
size_t erase_unit
The erase unit size.
Definition flash_simulator.h:33
bool explicit_erase
Whether explicit erase is required.
Definition flash_simulator.h:35