This repository has been archived by the owner on Dec 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dma.h
41 lines (32 loc) · 1.39 KB
/
dma.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef DMA_H
#define DMA_H
/* DMA channel 0 register definitions */
#define REG_DMA0SAD *(u32*)0x40000B0 // source address
#define REG_DMA0DAD *(u32*)0x40000B4 // destination address
#define REG_DMA0CNT *(u32*)0x40000B8 // control register
/* DMA channel 1 register definitions */
#define REG_DMA1SAD *(u32*)0x40000BC // source address
#define REG_DMA1DAD *(u32*)0x40000C0 // destination address
#define REG_DMA1CNT *(u32*)0x40000C4 // control register
/* DMA channel 2 register definitions */
#define REG_DMA2SAD *(u32*)0x40000C8 // source address
#define REG_DMA2DAD *(u32*)0x40000CC // destination address
#define REG_DMA2CNT *(u32*)0x40000D0 // control register
/* DMA channel 3 register definitions */
#define REG_DMA3SAD *(u32*)0x40000D4 // source address
#define REG_DMA3DAD *(u32*)0x40000D8 // destination address
#define REG_DMA3CNT *(u32*)0x40000DC // control register
/* Defines */
#define DMA_CHANNEL_0 0
#define DMA_CHANNEL_1 1
#define DMA_CHANNEL_2 2
#define DMA_CHANNEL_3 3
#define DMA_DESTINATION_INCREMENT (0 << 21)
#define DMA_DESTINATION_DECREMENT (1 << 21)
#define DMA_DESTINATION_FIXED (2 << 21)
#define DMA_DESTINATION_RESET (3 << 21)
#define DMA_SOURCE_INCREMENT (0 << 23)
#define DMA_SOURCE_DECREMENT (1 << 23)
#define DMA_SOURCE_FIXED (2 << 23)
#define DMA_ON (1 << 31)
#endif