Helper layer that provides the common functionality for Vector DMA (VDMA). More...
Data Structures | |
struct | nrf_vdma_job_t |
Structure describing VDMA job. More... | |
Macros | |
#define | NRF_VDMA_BUFFER_SIZE_MASK VDMADESCRIPTOR_CONFIG_CNT_Msk |
Maximum size of VDMA buffer. | |
#define | NRF_VDMA_REDUCED_JOB_SIZE(count) (count + 2) |
Macro for computing size of the array of reduced job structures. | |
#define | NRF_VDMA_JOB_ELEMENT(p_buffer, size, attribute) |
Macro for defining an element of a job list. | |
#define | NRF_VDMA_REDUCED_JOB_INIT_ELEMENT(p_buffer, size, attribute) NRF_VDMA_JOB_ELEMENT(p_buffer, size, NRF_VDMA_ATTRIBUTE_FIXED_ATTR | (attribute)) |
Macro for defining initial element of reduced job list. | |
#define | NRFX_VDMA_PERIPH_JOB(addr, size) NRF_VDMA_JOB_ELEMENT(addr, size, NRF_VDMA_EXT_ATTRIBUTE_PERIPHERAL_MODE) |
Macro for defining a job for transfer engaging peripheral. | |
Typedefs | |
typedef uint32_t | nrf_vdma_job_reduced_t |
Type describing VDMA job with fixed attributes and length. | |
Enumerations | |
enum | nrf_vdma_attributes_t { NRF_VDMA_ATTRIBUTE_PLAIN_DATA = 0x00 , NRF_VDMA_ATTRIBUTE_BYTE_SWAP = 0x07 , NRF_VDMA_ATTRIBUTE_JOB_LIST = 0x08 , NRF_VDMA_ATTRIBUTE_BUFFER_FILL = 0x09 , NRF_VDMA_ATTRIBUTE_FIXED_ATTR = 0x0A , NRF_VDMA_ATTRIBUTE_CRC = 0x0B , NRF_VDMA_ATTRIBUTE_STATIC_ADDR = 0x0C , NRF_VDMA_ATTRIBUTE_PLAIN_DATA_BUF_WRITE = 0x0D } |
VDMA attributes. More... | |
enum | nrf_vdma_ext_attribute_t { NRF_VDMA_EXT_ATTRIBUTE_PERIPHERAL_MODE = 0x40 , NRF_VDMA_EXT_ATTRIBUTE_EVENT_ENABLE = 0x80 } |
VDMA extended attributes. More... | |
Functions | |
__STATIC_INLINE void | nrf_vdma_job_fill (nrf_vdma_job_t *p_job, void *p_buffer, size_t size, uint8_t attributes) |
Function for filling the specified structure of the job with given job parameters. | |
__STATIC_INLINE void | nrf_vdma_job_reduced_init (nrf_vdma_job_reduced_t *p_job, void *p_buffer, size_t size, uint8_t attributes) |
Function for initializing the specified structure of the job with fixed attributes. | |
__STATIC_INLINE void | nrf_vdma_job_reduced_fill (nrf_vdma_job_reduced_t *p_job, void *p_buffer) |
Function for filling the specified reduced structure of the job with given buffer pointer. | |
__STATIC_INLINE void * | nrf_vdma_job_buffer_get (nrf_vdma_job_t const *p_job) |
Function for getting the pointer to the buffer associated with specified job. | |
__STATIC_INLINE size_t | nrf_vdma_job_size_get (nrf_vdma_job_t const *p_job) |
Function for getting the size of the buffer associated with specified job. | |
__STATIC_INLINE void | nrf_vdma_job_terminate (nrf_vdma_job_t *p_job) |
Function for terminating the specified job. | |
__STATIC_INLINE void | nrf_vdma_job_link (nrf_vdma_job_t *p_job, nrf_vdma_job_t *p_job_linked) |
Function for linking the job with another job. | |
Helper layer that provides the common functionality for Vector DMA (VDMA).
#define NRF_VDMA_JOB_ELEMENT | ( | p_buffer, | |
size, | |||
attribute | |||
) |
Macro for defining an element of a job list.
[in] | p_buffer | Pointer to the buffer. |
[in] | size | Size of the transfer. |
[in] | attribute | Attribute mask. |
#define NRF_VDMA_REDUCED_JOB_INIT_ELEMENT | ( | p_buffer, | |
size, | |||
attribute | |||
) | NRF_VDMA_JOB_ELEMENT(p_buffer, size, NRF_VDMA_ATTRIBUTE_FIXED_ATTR | (attribute)) |
Macro for defining initial element of reduced job list.
[in] | p_buffer | Job buffer. |
[in] | size | Size of the job buffer. |
[in] | attribute | Attributes of the job. |
#define NRF_VDMA_REDUCED_JOB_SIZE | ( | count | ) | (count + 2) |
Macro for computing size of the array of reduced job structures.
[in] | count | Number of jobs to be stored in reduced job list. |
#define NRFX_VDMA_PERIPH_JOB | ( | addr, | |
size | |||
) | NRF_VDMA_JOB_ELEMENT(addr, size, NRF_VDMA_EXT_ATTRIBUTE_PERIPHERAL_MODE) |
Macro for defining a job for transfer engaging peripheral.
[in] | addr | Starting address. |
[in] | size | Size of a DMA job. |
VDMA attributes.
VDMA extended attributes.
__STATIC_INLINE void * nrf_vdma_job_buffer_get | ( | nrf_vdma_job_t const * | p_job | ) |
Function for getting the pointer to the buffer associated with specified job.
[in] | p_job | Pointer to the structure of the specified job. |
__STATIC_INLINE void nrf_vdma_job_fill | ( | nrf_vdma_job_t * | p_job, |
void * | p_buffer, | ||
size_t | size, | ||
uint8_t | attributes | ||
) |
Function for filling the specified structure of the job with given job parameters.
[out] | p_job | Pointer to the structure of the job to be filled. |
[in] | p_buffer | Job buffer. |
[in] | size | Size of the job buffer. |
[in] | attributes | Attributes of the job. |
__STATIC_INLINE void nrf_vdma_job_link | ( | nrf_vdma_job_t * | p_job, |
nrf_vdma_job_t * | p_job_linked | ||
) |
Function for linking the job with another job.
When VectorDMA encounters job that is linked to another job, execution of the linked job starts.
[out] | p_job | Pointer to the structure of the job to become link. |
[in] | p_job_linked | Pointer to the structure of the job to be linked. |
__STATIC_INLINE void nrf_vdma_job_reduced_fill | ( | nrf_vdma_job_reduced_t * | p_job, |
void * | p_buffer | ||
) |
Function for filling the specified reduced structure of the job with given buffer pointer.
[out] | p_job | Pointer to the reduced structure of the job to be filled. |
[in] | p_buffer | Job buffer. |
__STATIC_INLINE void nrf_vdma_job_reduced_init | ( | nrf_vdma_job_reduced_t * | p_job, |
void * | p_buffer, | ||
size_t | size, | ||
uint8_t | attributes | ||
) |
Function for initializing the specified structure of the job with fixed attributes.
First element of reduced job list occupies space for two elements.
[out] | p_job | Pointer to the reduced structure of the job to be filled. |
[in] | p_buffer | Job buffer. |
[in] | size | Size of the job buffer. |
[in] | attributes | Additional attribute of the job. |
__STATIC_INLINE size_t nrf_vdma_job_size_get | ( | nrf_vdma_job_t const * | p_job | ) |
Function for getting the size of the buffer associated with specified job.
[in] | p_job | Pointer to the structure of the specified job. |
__STATIC_INLINE void nrf_vdma_job_terminate | ( | nrf_vdma_job_t * | p_job | ) |
Function for terminating the specified job.
When VectorDMA encounters job that is terminated, processing of the job list stops.
[out] | p_job | Pointer to the structure of the job to be terminated. |