Nexus Embedded Platform 1.0.0
Statically assembled reusable embedded mechanisms
Loading...
Searching...
No Matches
dma.h
Go to the documentation of this file.
1
9#ifndef NEXUS_IO_DMA_H
10#define NEXUS_IO_DMA_H
11
12#include "nexus/core/status.h"
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18#define NX_DMA_MEMORY_READ 1U
19#define NX_DMA_MEMORY_WRITE 2U
20
23
31typedef struct {
32 uintptr_t begin;
33 size_t size;
34 uint32_t permissions;
36
44typedef struct {
45 uint8_t controller;
46 uint8_t stream;
47 uint8_t channel;
49
63
85 size_t count, const void* data,
86 size_t length, size_t alignment,
87 nx_dma_direction_t direction);
88
105 size_t count);
106
120
121#ifdef __cplusplus
122}
123#endif
124
125#endif
nx_dma_direction_t
Transfer direction determines device access to caller memory.
Definition dma.h:22
@ NX_DMA_FROM_DEVICE
Definition dma.h:22
@ NX_DMA_TO_DEVICE
Definition dma.h:22
nx_result_t nx_dma_drain_check(const nx_dma_drain_facts_t *facts)
Require engine, IRQ and peripheral drain independently.
nx_result_t nx_dma_buffer_validate(const nx_dma_memory_region_t *regions, size_t count, const void *data, size_t length, size_t alignment, nx_dma_direction_t direction)
Validate an entire buffer within one explicit memory domain.
nx_result_t nx_dma_resources_validate(const nx_dma_resource_t *resources, size_t count)
Reject duplicate physical streams in an assembled resource set.
Small vendor-independent result vocabulary.
nx_result_t
Operation result; success at submission means admission only.
Definition status.h:21
Independent facts required before memory borrow release.
Definition dma.h:56
bool irq_detached
Definition dma.h:60
bool peripheral_idle
Definition dma.h:61
size_t length
Definition dma.h:57
size_t remaining
Definition dma.h:58
bool engine_disabled
Definition dma.h:59
Reviewed DMA-visible memory interval, never CPU accessibility.
Definition dma.h:31
uint32_t permissions
Definition dma.h:34
uintptr_t begin
Definition dma.h:32
Opaque physical engine and request selector identities.
Definition dma.h:44
uint8_t controller
Definition dma.h:45
uint8_t stream
Definition dma.h:46
uint8_t channel
Definition dma.h:47