libnds
Functions
fifo.h File Reference

DSP <-> ARM9 FIFO transfer utilities. More...

#include <nds/arm9/teak/dsp.h>

Functions

static void dspFifoReadData (u16 src, u16 *dst, int length)
 Receives data from DSP data memory using the FIFO using default settings. More...
 
void dspFifoRecv (DSP_PCFG_MEMSEL mem, u16 src, bool fixedSrc, u16 *dst, bool fixedDst, int length, DSP_PCFG_RLEN lengthMode)
 Receives data from DSP memory using the FIFO. More...
 
void dspFifoSend (DSP_PCFG_MEMSEL mem, const u16 *src, bool fixedSrc, u16 dst, bool fixedDst, int length)
 Sends data to the DSP memory using the FIFO. More...
 
static void dspFifoWriteData (const u16 *src, u16 dst, int length)
 Sends data to the DSP data memory using the FIFO using default settings. More...
 

Detailed Description

DSP <-> ARM9 FIFO transfer utilities.

This file contains functions to read and write DSP memory from the ARM9.

Function Documentation

◆ dspFifoReadData()

static void dspFifoReadData ( u16  src,
u16 dst,
int  length 
)
inlinestatic

Receives data from DSP data memory using the FIFO using default settings.

Parameters
srcSource address in the selected DSP memory (16 bit units)
dstDestination address in the ARM9 memory map.
lengthLength of the transfer in 16 bit units.

◆ dspFifoRecv()

void dspFifoRecv ( DSP_PCFG_MEMSEL  mem,
u16  src,
bool  fixedSrc,
u16 dst,
bool  fixedDst,
int  length,
DSP_PCFG_RLEN  lengthMode 
)

Receives data from DSP memory using the FIFO.

This can't read from program memory.

Parameters
memSource memory. DSP_PCFG_MEMSEL_PROG not allowed.
srcSource address in the selected DSP memory (16 bit units)
fixedSrcTrue if the source address is fixed.
dstDestination address in the ARM9 memory map.
fixedDstTrue if the destination address is fixed.
lengthLength of the transfer in 16 bit units.
lengthModeLength mode of the transfer. Usually DSP_PCFG_RLEN_FREE.

◆ dspFifoSend()

void dspFifoSend ( DSP_PCFG_MEMSEL  mem,
const u16 src,
bool  fixedSrc,
u16  dst,
bool  fixedDst,
int  length 
)

Sends data to the DSP memory using the FIFO.

This can't write to program memory.

Parameters
memDestination memory. DSP_PCFG_MEMSEL_PROG isn't allowed.
srcSource address in the ARM9 memory map.
fixedSrcTrue if the source address is fixed.
dstDestination address in the selected DSP memory (16 bit units).
fixedDstTrue if the destination address is fixed
lengthLength of the transfer in 16 bit units.

◆ dspFifoWriteData()

static void dspFifoWriteData ( const u16 src,
u16  dst,
int  length 
)
inlinestatic

Sends data to the DSP data memory using the FIFO using default settings.

This can't write to program memory.

Parameters
srcSource address in the ARM9 memory map.
dstDestination address in the selected DSP memory (16 bit units).
lengthLength of the transfer in 16 bit units.