Memory-to-Memory Vector DMA (MVDMA) peripheral driver.
More...
|
nrfx_err_t | nrfx_mvdma_init (nrfx_mvdma_t const *p_instance, uint8_t interrupt_priority, nrfx_mvdma_event_handler_t event_handler) |
| Function for initializing the MVDMA driver instance.
|
|
void | nrfx_mvdma_uninit (nrfx_mvdma_t const *p_instance) |
| Function for uninitializing the MVDMA driver instance.
|
|
bool | nrfx_mvdma_init_check (nrfx_mvdma_t const *p_instance) |
| Function for checking if the MVDMA driver instance is initialized.
|
|
nrfx_err_t | nrfx_mvdma_copy (nrfx_mvdma_t const *p_instance, nrfx_mvdma_copy_request_t const *p_request) |
| Function for requesting a single copy operation.
|
|
nrfx_err_t | nrfx_mvdma_buffer_clear (nrfx_mvdma_t const *p_instance, void *p_buffer, size_t size, void *p_context) |
| Function for requesting filling buffer with zeros.
|
|
nrfx_err_t | nrfx_mvdma_list_execute (nrfx_mvdma_t const *p_instance, nrfx_mvdma_list_request_t const *p_request, void *p_context) |
| Function for executing the specified source and sink job lists.
|
|
nrfx_err_t | nrfx_mvdma_multi_list_set (nrfx_mvdma_t const *p_instance, nrfx_mvdma_multi_list_request_t const *p_request) |
| Function for setting the specified source and sink job lists.
|
|
nrfx_err_t | nrfx_mvdma_multi_list_start (nrfx_mvdma_t const *p_instance, uint8_t idx, void *p_context) |
| Function for executing the specified source and sink job lists.
|
|
bool | nrfx_mvdma_busy_check (nrfx_mvdma_t const *p_instance) |
| Function for checking if the specified driver instance is busy.
|
|
void | nrfx_mvdma_abort (nrfx_mvdma_t const *p_instance) |
| Function for aborting an ongoing request.
|
|
Memory-to-Memory Vector DMA (MVDMA) peripheral driver.
◆ NRFX_MVDMA_INSTANCE
#define NRFX_MVDMA_INSTANCE |
( |
|
_inst_name | ) |
|
Value:{ \
}
#define NRFX_CONCAT_2(p1, p2)
Macro for concatenating two tokens in macro expansion.
Definition: nrfx_common.h:134
#define NRFX_CONCAT_3(p1, p2, p3)
Macro for concatenating three tokens in macro expansion.
Definition: nrfx_common.h:155
Macro for creating a MVDMA driver instance.
- Parameters
-
[in] | _inst_name | Name of the peripheral instance, without the NRF_ prefix. Valid values are: MVDMA and GMVDMA . |
◆ nrfx_mvdma_event_handler_t
typedef void(* nrfx_mvdma_event_handler_t) (nrfx_mvdma_event_t const *p_event, void *p_context) |
MVDMA driver event handler.
- Parameters
-
[in] | p_event | Pointer to event structure. Event is allocated on the stack so it is available only within the context of the event handler. |
[in] | p_context | Context passed to the interrupt handler, set on copy or list execution request. |
◆ nrfx_mvdma_evt_type_t
MVDMA driver event types.
Enumerator |
---|
NRFX_MVDMA_EVT_REQUEST_DONE | Request done.
|
NRFX_MVDMA_EVT_ERROR | Source and/or sink error.
|
◆ nrfx_mvdma_abort()
Function for aborting an ongoing request.
- Note
- NRFX_MVDMA_EVT_REQUEST_DONE event will be generated when the request is aborted. It will contain number of jobs performed until the abort was called. The event handler will be called from the MVDMA interrupt context.
- Parameters
-
[in] | p_instance | Pointer to the driver instance structure. |
◆ nrfx_mvdma_buffer_clear()
nrfx_err_t nrfx_mvdma_buffer_clear |
( |
nrfx_mvdma_t const * |
p_instance, |
|
|
void * |
p_buffer, |
|
|
size_t |
size, |
|
|
void * |
p_context |
|
) |
| |
Function for requesting filling buffer with zeros.
- Parameters
-
p_instance | Pointer to the driver instance structure. |
p_buffer | Pointer to the buffer to fill with zeros. |
size | Size of the buffer |
p_context | Context passed to event handler. |
- Return values
-
NRFX_SUCCESS | Clear operation requested successfully. |
NRFX_ERROR_BUSY | Different request is executed at the moment. |
◆ nrfx_mvdma_busy_check()
bool nrfx_mvdma_busy_check |
( |
nrfx_mvdma_t const * |
p_instance | ) |
|
Function for checking if the specified driver instance is busy.
- Parameters
-
[in] | p_instance | Pointer to the driver instance structure. |
- Return values
-
true | Driver is busy. |
false | Driver is not busy. |
◆ nrfx_mvdma_copy()
Function for requesting a single copy operation.
- Parameters
-
[in] | p_instance | Pointer to the driver instance structure. |
[in] | p_request | Pointer to the structure that describes the request. |
- Return values
-
NRFX_SUCCESS | Copy operation requested successfully. |
NRFX_ERROR_BUSY | Different request is executed at the moment. |
◆ nrfx_mvdma_init()
Function for initializing the MVDMA driver instance.
- Parameters
-
[in] | p_instance | Pointer to the driver instance structure. |
[in] | interrupt_priority | Interrupt priority. |
[in] | event_handler | Event handler provided by the user. If NULL, transfers will be performed in blocking mode. |
- Return values
-
NRFX_SUCCESS | Initialization was successful. |
NRFX_ERROR_ALREADY | The driver is already initialized. |
◆ nrfx_mvdma_init_check()
bool nrfx_mvdma_init_check |
( |
nrfx_mvdma_t const * |
p_instance | ) |
|
Function for checking if the MVDMA driver instance is initialized.
- Parameters
-
[in] | p_instance | Pointer to the driver instance structure. |
- Return values
-
true | Instance is already initialized. |
false | Instance is not initialized. |
◆ nrfx_mvdma_list_execute()
Function for executing the specified source and sink job lists.
- Warning
- Job lists must remain valid while being processed by the MVDMA peripheral.
- Parameters
-
[in] | p_instance | Pointer to the driver instance structure. |
[in] | p_request | Pointer to the structure that describes the request. |
[in] | p_context | Context passed to event handler. |
- Return values
-
NRFX_SUCCESS | Execution of job list requested successfully. |
NRFX_ERROR_BUSY | Different request is executed at the moment. |
◆ nrfx_mvdma_multi_list_set()
nrfx_err_t nrfx_mvdma_multi_list_set |
( |
nrfx_mvdma_t const * |
p_instance, |
|
|
nrfx_mvdma_multi_list_request_t const * |
p_request |
|
) |
| |
Function for setting the specified source and sink job lists.
- Parameters
-
[in] | p_instance | Pointer to the driver instance structure. |
[in] | p_request | Pointer to the structure that describes list of requests. |
- Return values
-
NRFX_SUCCESS | Job lists assignment successful. |
NRFX_ERROR_BUSY | Different request is executed at the moment. |
◆ nrfx_mvdma_multi_list_start()
Function for executing the specified source and sink job lists.
- Parameters
-
[in] | p_instance | Pointer to the driver instance structure. |
[in] | idx | Index of the job list to be executed. |
[in] | p_context | Context passed to event handler. |
- Return values
-
NRFX_SUCCESS | Job lists assignment successful. |
NRFX_ERROR_BUSY | Different request is executed at the moment. |
◆ nrfx_mvdma_uninit()
Function for uninitializing the MVDMA driver instance.
- Parameters
-
[in] | p_instance | Pointer to the driver instance structure. |