12#ifndef INCLUDE_ZEPHYR_DRIVERS_EMUL_BBRAM_H_
13#define INCLUDE_ZEPHYR_DRIVERS_EMUL_BBRAM_H_
33__subsystem
struct emul_bbram_driver_api {
35 int (*set_data)(
const struct emul *target,
size_t offset,
size_t count,
38 int (*get_data)(
const struct emul *target,
size_t offset,
size_t count,
uint8_t *data);
63 struct emul_bbram_driver_api *api = (
struct emul_bbram_driver_api *)target->
backend_api;
65 if (api->set_data ==
NULL) {
69 return api->set_data(target, offset, count, data);
90 struct emul_bbram_driver_api *api = (
struct emul_bbram_driver_api *)target->
backend_api;
92 if (api->get_data ==
NULL) {
96 return api->get_data(target, offset, count, data);
Public APIs for the device emulation framework.
static int emul_bbram_backend_get_data(const struct emul *target, size_t offset, size_t count, uint8_t *data)
Get the expected data in the bbram region.
Definition emul_bbram.h:83
static int emul_bbram_backend_set_data(const struct emul *target, size_t offset, size_t count, const uint8_t *data)
Set the expected data in the bbram region.
Definition emul_bbram.h:56
#define ENOTSUP
Unsupported value.
Definition errno.h:115
#define NULL
Definition iar_missing_defs.h:20
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
An emulator instance - represents the target emulated device/peripheral that is interacted with throu...
Definition emul.h:88
void * data
Emulator-specific data.
Definition emul.h:96
const void * backend_api
Address of the API structure exposed by the emulator instance.
Definition emul.h:109