![]() |
RZT Flexible Software Package Documentation
Release v3.1.0
|
|
Interface for Shared Memory.
The SHARED_MEMORY interface provides Shared Memory functionality.
Data Structures | |
| struct | shared_memory_callback_args_t |
| struct | shared_memory_status_t |
| struct | shared_memory_cfg_t |
| struct | shared_memory_api_t |
| struct | shared_memory_instance_t |
Typedefs | |
| typedef void | shared_memory_ctrl_t |
Enumerations | |
| enum | shared_memory_state_t |
| struct shared_memory_callback_args_t |
SHARED_MEMORY callback parameter definition
| Data Fields | ||
|---|---|---|
| void const * | p_context | Pointer to user-provided context. |
| shared_memory_state_t | state | Connection status with the communication partner. |
| struct shared_memory_status_t |
SHARED_MEMORY status indicators
| Data Fields | ||
|---|---|---|
| shared_memory_state_t | state | State of this driver. |
| struct shared_memory_cfg_t |
SHARED_MEMORY configuration block
Data Fields | |
| uint8_t | semaphore_reg |
| Identifier recognizable by implementation. More... | |
| uint8_t * | p_memory |
| Start address of shared memory region. | |
| uint32_t | memory_size |
| Size of shared memory area in bytes. | |
| void(* | p_callback )(shared_memory_callback_args_t *p_args) |
| Pointer to callback function. More... | |
| void const * | p_context |
| Pointer to the user-provided context. | |
| void const * | p_extend |
| Extended configuration of hardware dependent. More... | |
| uint8_t shared_memory_cfg_t::semaphore_reg |
Identifier recognizable by implementation.
Generic configuration
| void(* shared_memory_cfg_t::p_callback) (shared_memory_callback_args_t *p_args) |
Pointer to callback function.
Parameters to control software behavior
| void const* shared_memory_cfg_t::p_extend |
Extended configuration of hardware dependent.
Extended configuration
| struct shared_memory_api_t |
Interface definition for inter-core data access via inter-core shared memory
Data Fields | |
| fsp_err_t(* | open )(shared_memory_ctrl_t *const p_ctrl, shared_memory_cfg_t const *const p_cfg) |
| fsp_err_t(* | read )(shared_memory_ctrl_t *const p_ctrl, uint8_t *const p_dest, uint32_t const offset, uint32_t const bytes) |
| fsp_err_t(* | write )(shared_memory_ctrl_t *const p_ctrl, uint8_t *const p_src, uint32_t const offset, uint32_t const bytes) |
| fsp_err_t(* | statusGet )(shared_memory_ctrl_t *const p_ctrl, shared_memory_status_t *p_status) |
| fsp_err_t(* | callbackSet )(shared_memory_ctrl_t *const p_ctrl, void(*p_callback)(shared_memory_callback_args_t *), void const *const p_context, shared_memory_callback_args_t *const p_callback_memory) |
| fsp_err_t(* | close )(shared_memory_ctrl_t *const p_ctrl) |
| fsp_err_t(* shared_memory_api_t::open) (shared_memory_ctrl_t *const p_ctrl, shared_memory_cfg_t const *const p_cfg) |
Opens the shared memory driver and initializes the hardware.
| [in] | p_ctrl | Pointer to control block. Must be declared by user. Elements are set here. |
| [in] | p_cfg | Pointer to configuration structure. |
| fsp_err_t(* shared_memory_api_t::read) (shared_memory_ctrl_t *const p_ctrl, uint8_t *const p_dest, uint32_t const offset, uint32_t const bytes) |
Performs a read operation from inter-core shared memory.
| [in] | p_ctrl | Pointer to control block set in shared_memory_api_t::open call. |
| [out] | p_dest | Pointer to the location to store read data. |
| [in] | offset | Offset position from the start address of the shared memory to read (bytes). |
| [in] | bytes | Number of bytes to read. |
| fsp_err_t(* shared_memory_api_t::write) (shared_memory_ctrl_t *const p_ctrl, uint8_t *const p_src, uint32_t const offset, uint32_t const bytes) |
Performs a write operation to inter-core shared memory.
| [in] | p_ctrl | Pointer to control block set in shared_memory_api_t::open call. |
| [in] | p_src | Pointer to the location to get write data from. |
| [in] | offset | Offset position from the start address of the shared memory to write (bytes). |
| [in] | bytes | Number of bytes to write. |
| fsp_err_t(* shared_memory_api_t::statusGet) (shared_memory_ctrl_t *const p_ctrl, shared_memory_status_t *p_status) |
Gets the status of the shared memory.
| [in] | p_ctrl | Pointer to control block set in shared_memory_api_t::open call. |
| [out] | p_status | Pointer to store current status. |
| fsp_err_t(* shared_memory_api_t::callbackSet) (shared_memory_ctrl_t *const p_ctrl, void(*p_callback)(shared_memory_callback_args_t *), void const *const p_context, shared_memory_callback_args_t *const p_callback_memory) |
Specify callback function and optional context pointer and working memory pointer.
| [in] | p_ctrl | Pointer to control block set in shared_memory_api_t::open call. |
| [in] | p_callback | Callback function |
| [in] | p_context | Pointer to send to callback function |
| [in] | p_callback_memory | Pointer to volatile memory where callback structure can be allocated. Callback arguments allocated here are only valid during the callback. |
| fsp_err_t(* shared_memory_api_t::close) (shared_memory_ctrl_t *const p_ctrl) |
Closes the driver and releases the device.
| [in] | p_ctrl | Pointer to control block set in shared_memory_api_t::open call. |
| struct shared_memory_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
| Data Fields | ||
|---|---|---|
| shared_memory_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
| shared_memory_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
| shared_memory_api_t const * | p_api | Pointer to the API structure for this instance. |
| typedef void shared_memory_ctrl_t |
SHARED_MEMORY control block. Allocate an instance specific control block to pass into the SHARED_MEMORY API calls.