nrfx 3.3
Data Structures | Macros | Typedefs | Enumerations | Functions
MVDMA driver

Memory-to-Memory Vector DMA (MVDMA) peripheral driver. More...

Data Structures

struct  nrfx_mvdma_t
 Structure for the MVDMA driver instance. More...
 
struct  nrfx_mvdma_copy_request_t
 Structure describing copy request for the MVDMA driver. More...
 
struct  nrfx_mvdma_source_evt_t
 Stucture describing the MVDMA event for the source job list. More...
 
struct  nrfx_mvdma_sink_evt_t
 Stucture describing the MVDMA event for the sink job list. More...
 
struct  nrfx_mvdma_event_t
 Structure describing event of the MVDMA driver. More...
 

Macros

#define NRFX_MVDMA_INSTANCE(_inst_name)
 Macro for creating a MVDMA driver instance.
 

Typedefs

typedef nrfy_mvdma_list_request_t nrfx_mvdma_list_request_t
 Structure describing list execution request for the MVDMA driver.
 
typedef nrfy_mvdma_list_desc_t nrfx_mvdma_list_evt_t
 Auxiliary structure describing the MVDMA event for job list with unspecified direction.
 
typedef void(* nrfx_mvdma_event_handler_t) (nrfx_mvdma_event_t const *p_event, void *p_context)
 MVDMA driver event handler.
 

Enumerations

enum  nrfx_mvdma_evt_type_t {
  NRFX_MVDMA_EVT_REQUEST_DONE ,
  NRFX_MVDMA_EVT_ERROR
}
 MVDMA driver event types. More...
 

Functions

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.
 

Detailed Description

Memory-to-Memory Vector DMA (MVDMA) peripheral driver.

Macro Definition Documentation

◆ NRFX_MVDMA_INSTANCE

#define NRFX_MVDMA_INSTANCE (   _inst_name)
Value:
{ \
.p_reg = NRFX_CONCAT_2(NRF_, _inst_name), \
.drv_inst_idx = NRFX_CONCAT_3(NRFX_, _inst_name, _INST_IDX) \
}
#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_nameName of the peripheral instance, without the NRF_ prefix. Valid values are: MVDMA and GMVDMA.

Typedef Documentation

◆ 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_eventPointer to event structure. Event is allocated on the stack so it is available only within the context of the event handler.
[in]p_contextContext passed to the interrupt handler, set on copy or list execution request.

Enumeration Type Documentation

◆ 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.

Function Documentation

◆ nrfx_mvdma_abort()

void nrfx_mvdma_abort ( nrfx_mvdma_t const *  p_instance)

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_instancePointer 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_instancePointer to the driver instance structure.
p_bufferPointer to the buffer to fill with zeros.
sizeSize of the buffer
p_contextContext passed to event handler.
Return values
NRFX_SUCCESSClear operation requested successfully.
NRFX_ERROR_BUSYDifferent 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_instancePointer to the driver instance structure.
Return values
trueDriver is busy.
falseDriver is not busy.

◆ nrfx_mvdma_copy()

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.

Parameters
[in]p_instancePointer to the driver instance structure.
[in]p_requestPointer to the structure that describes the request.
Return values
NRFX_SUCCESSCopy operation requested successfully.
NRFX_ERROR_BUSYDifferent request is executed at the moment.

◆ nrfx_mvdma_init()

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.

Parameters
[in]p_instancePointer to the driver instance structure.
[in]interrupt_priorityInterrupt priority.
[in]event_handlerEvent handler provided by the user. If NULL, transfers will be performed in blocking mode.
Return values
NRFX_SUCCESSInitialization was successful.
NRFX_ERROR_ALREADYThe 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_instancePointer to the driver instance structure.
Return values
trueInstance is already initialized.
falseInstance is not initialized.

◆ nrfx_mvdma_list_execute()

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.

Warning
Job lists must remain valid while being processed by the MVDMA peripheral.
Parameters
[in]p_instancePointer to the driver instance structure.
[in]p_requestPointer to the structure that describes the request.
[in]p_contextContext passed to event handler.
Return values
NRFX_SUCCESSExecution of job list requested successfully.
NRFX_ERROR_BUSYDifferent 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_instancePointer to the driver instance structure.
[in]p_requestPointer to the structure that describes list of requests.
Return values
NRFX_SUCCESSJob lists assignment successful.
NRFX_ERROR_BUSYDifferent request is executed at the moment.

◆ nrfx_mvdma_multi_list_start()

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.

Parameters
[in]p_instancePointer to the driver instance structure.
[in]idxIndex of the job list to be executed.
[in]p_contextContext passed to event handler.
Return values
NRFX_SUCCESSJob lists assignment successful.
NRFX_ERROR_BUSYDifferent request is executed at the moment.

◆ nrfx_mvdma_uninit()

void nrfx_mvdma_uninit ( nrfx_mvdma_t const *  p_instance)

Function for uninitializing the MVDMA driver instance.

Parameters
[in]p_instancePointer to the driver instance structure.

Documentation feedback | Developer Zone | Subscribe | Updated