6#ifndef INCLUDE_ZEPHYR_DRIVERS_EMUL_BBRAM_H_
7#define INCLUDE_ZEPHYR_DRIVERS_EMUL_BBRAM_H_
26__subsystem
struct emul_bbram_driver_api {
28 int (*set_data)(
const struct emul *target,
size_t offset,
size_t count,
31 int (*get_data)(
const struct emul *target,
size_t offset,
size_t count,
uint8_t *data);
52 if (target == NULL || target->
backend_api == NULL) {
56 struct emul_bbram_driver_api *api = (
struct emul_bbram_driver_api *)target->
backend_api;
58 if (api->set_data == NULL) {
62 return api->set_data(target, offset, count, data);
79 if (target == NULL || target->
backend_api == NULL) {
83 struct emul_bbram_driver_api *api = (
struct emul_bbram_driver_api *)target->
backend_api;
85 if (api->get_data == NULL) {
89 return api->get_data(target, offset, count, data);
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:76
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:49
#define ENOTSUP
Unsupported value.
Definition: errno.h:115
__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:78
void * data
Emulator-specific data.
Definition: emul.h:86
const void * backend_api
Address of the API structure exposed by the emulator instance.
Definition: emul.h:97