libdragon
Loading...
Searching...
No Matches
Macros | Functions

DMA Controller. More...

Go to the source code of this file.

Macros

#define PI_DRAM_ADDR   ((volatile uint32_t*)0xA4600000)
 PI DMA: DRAM address register.
 
#define PI_CART_ADDR   ((volatile uint32_t*)0xA4600004)
 PI DMA: cartridge address register.
 
#define PI_RD_LEN   ((volatile uint32_t*)0xA4600008)
 PI DMA: read length register.
 
#define PI_WR_LEN   ((volatile uint32_t*)0xA460000C)
 PI DMA: write length register.
 
#define PI_STATUS   ((volatile uint32_t*)0xA4600010)
 PI: status register.
 

Functions

void dma_write_raw_async (const void *ram_address, unsigned long pi_address, unsigned long len)
 Start writing data to a peripheral through PI DMA (low-level)
 
void dma_write (const void *ram_address, unsigned long pi_address, unsigned long len)
 Write to a peripheral.
 
void dma_read_raw_async (void *ram_address, unsigned long pi_address, unsigned long len)
 Start reading data from a peripheral through PI DMA (low-level)
 
void dma_read_async (void *ram_address, unsigned long pi_address, unsigned long len)
 Start reading data from a peripheral through PI DMA.
 
void dma_read (void *ram_address, unsigned long pi_address, unsigned long len)
 Read data from a peripheral through PI DMA, waiting for completion.
 
void dma_wait (void)
 Wait until an async DMA or I/O transfer is finished.
 
uint32_t io_read (uint32_t pi_address)
 Read a 32 bit integer from a peripheral using the CPU.
 
void io_write (uint32_t pi_address, uint32_t data)
 Write a 32 bit integer to a peripheral using the CPU.
 
bool io_accessible (uint32_t pi_address)
 Check whether the specified PI address can be accessed doing I/O from CPU.
 
volatile int dma_busy (void)
 Return whether the DMA controller is currently busy.
 

Detailed Description

DMA Controller.