12#ifndef INCLUDE_ZEPHYR_DRIVERS_COREDUMP_H_
13#define INCLUDE_ZEPHYR_DRIVERS_COREDUMP_H_
67typedef void (*coredump_device_dump_t)(
const struct device *dev);
73typedef bool (*coredump_device_register_memory_t)(
const struct device *dev,
80typedef bool (*coredump_device_unregister_memory_t)(
const struct device *dev,
87typedef bool (*coredump_device_register_callback_t)(
const struct device *dev,
93__subsystem
struct coredump_driver_api {
94 coredump_device_dump_t dump;
95 coredump_device_register_memory_t register_memory;
96 coredump_device_unregister_memory_t unregister_memory;
97 coredump_device_register_callback_t register_callback;
117 const struct coredump_driver_api *api =
118 (
const struct coredump_driver_api *)dev->
api;
120 return api->register_memory(dev, region);
136 const struct coredump_driver_api *api =
137 (
const struct coredump_driver_api *)dev->
api;
139 return api->unregister_memory(dev, region);
154 const struct coredump_driver_api *api =
155 (
const struct coredump_driver_api *)dev->
api;
157 return api->register_callback(dev, callback);
static bool coredump_device_register_memory(const struct device *dev, struct coredump_mem_region_node *region)
Register a region of memory to be stored in core dump at the time it is generated.
Definition coredump.h:114
void(* coredump_dump_callback_t)(uintptr_t dump_area, size_t dump_area_size)
Callback that occurs at dump time, data copied into dump_area will be included in the dump that is ge...
Definition coredump.h:55
static bool coredump_device_register_callback(const struct device *dev, coredump_dump_callback_t callback)
Register a callback to be invoked at dump time.
Definition coredump.h:151
static bool coredump_device_unregister_memory(const struct device *dev, struct coredump_mem_region_node *region)
Unregister a region of memory to be stored in core dump at the time it is generated.
Definition coredump.h:133
struct _snode sys_snode_t
Single-linked list node structure.
Definition slist.h:39
#define bool
Definition stdbool.h:13
__UINTPTR_TYPE__ uintptr_t
Definition stdint.h:105
Structure describing a region in memory that may be stored in core dump at the time it is generated.
Definition coredump.h:37
sys_snode_t node
Node of single-linked list, do not modify.
Definition coredump.h:39
size_t size
Size of memory region.
Definition coredump.h:45
uintptr_t start
Address of start of memory region.
Definition coredump.h:42
Runtime device structure (in ROM) per driver instance.
Definition device.h:412
const void * api
Address of the API structure exposed by the device instance.
Definition device.h:418