41static inline void ws_gdma_set_sourcep(
const void __far *src) {
46static inline void ws_gdma_set_sourcei(uint32_t src) {
59#define ws_gdma_set_source(src) _Generic((src), \
60 int8_t: ws_gdma_set_sourcei, \
61 int16_t: ws_gdma_set_sourcei, \
62 int32_t: ws_gdma_set_sourcei, \
63 uint8_t: ws_gdma_set_sourcei, \
64 uint16_t: ws_gdma_set_sourcei, \
65 uint32_t: ws_gdma_set_sourcei, \
66 default: ws_gdma_set_sourcep \
88void ws_gdma_copyi(
void ws_iram *dest, uint32_t src, uint16_t length);
90static inline void ws_gdma_copyp(
void ws_iram *dest,
const void __far *src, uint16_t length) {
105#define ws_gdma_copy(dest, src, length) _Generic((src), \
106 int8_t: ws_gdma_copyi, \
107 int16_t: ws_gdma_copyi, \
108 int32_t: ws_gdma_copyi, \
109 uint8_t: ws_gdma_copyi, \
110 uint16_t: ws_gdma_copyi, \
111 uint32_t: ws_gdma_copyi, \
112 default: ws_gdma_copyp \
125static inline void ws_sdma_set_sourcep(
const void __far *src) {
130static inline void ws_sdma_set_sourcei(uint32_t src) {
143#define ws_sdma_set_source(src) _Generic((src), \
144 int8_t: ws_sdma_set_sourcei, \
145 int16_t: ws_sdma_set_sourcei, \
146 int32_t: ws_sdma_set_sourcei, \
147 uint8_t: ws_sdma_set_sourcei, \
148 uint16_t: ws_sdma_set_sourcei, \
149 uint32_t: ws_sdma_set_sourcei, \
150 default: ws_sdma_set_sourcep \
void ws_gdma_maybe_copy(void ws_iram *dest, const void __far *src, uint16_t length)
Copy words from a source pointer to a destination pointer, using DMA if present.
static void ws_gdma_set_length(uint16_t length)
Set the length of a general DMA transfer.
static void ws_sdma_set_length(uint32_t length)
Set the length of a sound DMA transfer.
static void ws_gdma_set_destination(void ws_iram *address)
Set the destination of a general DMA transfer.
#define WS_GDMA_LENGTH_PORT
#define WS_GDMA_SOURCE_H_PORT
#define WS_SDMA_LENGTH_H_PORT
#define WS_SDMA_SOURCE_H_PORT
#define WS_SDMA_SOURCE_L_PORT
#define WS_GDMA_SOURCE_L_PORT
#define WS_SDMA_LENGTH_L_PORT
#define WS_GDMA_DEST_PORT
static uint32_t ws_ptr_to_linear(const void ws_far *src)