PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
dma.h
Go to the documentation of this file.
1/*
2# _____ ___ ____ ___ ____
3# ____| | ____| | | |____|
4# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5#-----------------------------------------------------------------------
6# (c) 2005 Naomi Peori <naomi@peori.ca>
7# Licenced under Academic Free License version 2.0
8# Review ps2sdk README & LICENSE files for further details.
9*/
10
16#ifndef __DMA_H__
17#define __DMA_H__
18
19#include <tamtypes.h>
20#include <packet2_types.h>
21
22#define DMA_CHANNEL_VIF0 0x00
23#define DMA_CHANNEL_VIF1 0x01
24#define DMA_CHANNEL_GIF 0x02
25#define DMA_CHANNEL_fromIPU 0x03
26#define DMA_CHANNEL_toIPU 0x04
27#define DMA_CHANNEL_fromSIF0 0x05
28#define DMA_CHANNEL_toSIF1 0x06
29#define DMA_CHANNEL_SIF2 0x07
30#define DMA_CHANNEL_fromSPR 0x08
31#define DMA_CHANNEL_toSPR 0x09
32
33#define DMA_FLAG_TRANSFERTAG 0x01
34#define DMA_FLAG_INTERRUPTSAFE 0x02
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
40int dma_reset(void);
41
43int dma_channel_initialize(int channel, void *handler, int flags);
44
46void dma_channel_fast_waits(int channel);
47
49void dma_wait_fast(void);
50
52int dma_channel_wait(int channel, int timeout);
53
61void dma_channel_send_packet2(packet2_t *packet2, int channel, u8 flush_cache);
62
64int dma_channel_send_chain(int channel, void *data, int qwc, int flags, int spr);
65
67int dma_channel_send_chain_ucab(int channel, void *data, int qwc, int flags);
68
70int dma_channel_send_normal(int channel, void *data, int qwc, int flags, int spr);
71
73int dma_channel_send_normal_ucab(int channel, void *data, int qwc, int flags);
74
76int dma_channel_receive_normal(int channel, void *data, int data_size, int flags, int spr);
77
79int dma_channel_receive_chain(int channel, void *data, int data_size, int flags, int spr);
80
82int dma_channel_shutdown(int channel, int flags);
83
84#ifdef __cplusplus
85}
86#endif
87
88#endif /* __DMA_H__ */
void dma_wait_fast(void)
Definition dma.c:115
int dma_channel_send_normal(int channel, void *data, int qwc, int flags, int spr)
Definition dma.c:240
int dma_channel_receive_normal(int channel, void *data, int data_size, int flags, int spr)
Definition dma.c:327
int dma_channel_wait(int channel, int timeout)
Definition dma.c:130
int dma_channel_initialize(int channel, void *handler, int flags)
Definition dma.c:58
int dma_channel_receive_chain(int channel, void *data, int data_size, int flags, int spr)
Definition dma.c:298
void dma_channel_send_packet2(packet2_t *packet2, int channel, u8 flush_cache)
Definition dma.c:158
void dma_channel_fast_waits(int channel)
Definition dma.c:108
int dma_channel_send_chain_ucab(int channel, void *data, int qwc, int flags)
Definition dma.c:216
int dma_channel_send_chain(int channel, void *data, int qwc, int flags, int spr)
Definition dma.c:185
int dma_channel_send_normal_ucab(int channel, void *data, int qwc, int flags)
Definition dma.c:269
int dma_channel_shutdown(int channel, int flags)
Definition dma.c:356