-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #554 from red031000/master
cleanup MI_dma_card
- Loading branch information
Showing
2,750 changed files
with
1,211 additions
and
1,292 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,21 @@ | ||
#ifndef POKEDIAMOND_ARM7_MI_DMA_H | ||
#define POKEDIAMOND_ARM7_MI_DMA_H | ||
#ifndef NITRO_MI_DMA_H | ||
#define NITRO_MI_DMA_H | ||
|
||
#include "nitro/MI_dma_shared.h" | ||
#include "nitro/types.h" | ||
|
||
#include "registers.h" | ||
|
||
#define MI_DMA_TIMING_MASK (3UL << 28) | ||
#define MI_DMA_TIMING_CARD (2UL << 28) | ||
|
||
void MI_StopDma(u32 channel); | ||
void MI_WaitDma(u32 channel); | ||
|
||
#endif | ||
#define MIi_WAIT_BEFOREDMA(dmaCntp, dmaNo) \ | ||
do { \ | ||
dmaCntp = &((vu32 *)REG_DMA0SAD_ADDR)[dmaNo * 3 + 2]; \ | ||
while (*dmaCntp & REG_MI_DMA0CNT_E_MASK) {} \ | ||
} while (0) | ||
|
||
#endif // NITRO_MI_DMA_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,36 @@ | ||
#ifndef POKEDIAMOND_ARM7_REGISTERS_H | ||
#define POKEDIAMOND_ARM7_REGISTERS_H | ||
#ifndef NITRO_REGISTERS_H | ||
#define NITRO_REGISTERS_H | ||
|
||
#include "nitro/registers_shared.h" | ||
|
||
#define reg_EXTKEYIN (*(REGType16v *)0x4000136) | ||
|
||
#define reg_POWCNT2 (*(REGType16v *)0x4000304) | ||
|
||
|
||
#define reg_SOUNDCNT_VOL (*(REGType8v *)0x4000500) | ||
#define reg_SOUNDCNT_MIX (*(REGType8v *)0x4000501) | ||
|
||
#define reg_SOUNDxCNT_VOL(x) (*(REGType8v *)(0x4000400 + ((int)(x) * 0x10))) | ||
#define reg_SOUNDxCNT_VOLS(x) (*(REGType16v *)(0x4000400 + ((int)(x) * 0x10))) | ||
#define reg_SOUNDxCNT_PAN(x) (*(REGType8v *)(0x4000402 + ((int)(x) * 0x10))) | ||
#define reg_SOUNDxCNT_STAT(x) (*(REGType8v *)(0x4000403 + ((int)(x) * 0x10))) | ||
#define reg_SOUNDxCNT(x) (*(REGType32v *)(0x4000400 + ((int)x) * 0x10)) | ||
#define reg_SOUNDoffCNT(off) (*(REGType32v *)(0x4000400 + (int)(off))) | ||
#define reg_SOUNDxSAD(x) (*(REGType32v *)(0x4000404 + ((int)x) * 0x10)) | ||
#define reg_SOUNDoffSAD(off) (*(REGType32v *)(0x4000404 + (int)(off))) | ||
#define reg_SOUNDxTMR(x) (*(REGType16v *)(0x4000408 + ((int)x) * 0x10)) | ||
#define reg_SOUNDoffTMR(off) (*(REGType16v *)(0x4000408 + (int)(off))) | ||
#define reg_SOUNDxPNT(x) (*(REGType16v *)(0x400040A + ((int)x) * 0x10)) | ||
#define reg_SOUNDoffPNT(off) (*(REGType16v *)(0x400040A + (int)(off))) | ||
#define reg_SOUNDxLEN(x) (*(REGType32v *)(0x400040C + ((int)x) * 0x10)) | ||
#define reg_SOUNDoffLEN(off) (*(REGType32v *)(0x400040C + (int)(off))) | ||
#define reg_SOUNDxCNT_VOL(x) (*(REGType8v *)(0x4000400 + ((int)(x) * 0x10))) | ||
#define reg_SOUNDxCNT_VOLS(x) (*(REGType16v *)(0x4000400 + ((int)(x) * 0x10))) | ||
#define reg_SOUNDxCNT_PAN(x) (*(REGType8v *)(0x4000402 + ((int)(x) * 0x10))) | ||
#define reg_SOUNDxCNT_STAT(x) (*(REGType8v *)(0x4000403 + ((int)(x) * 0x10))) | ||
#define reg_SOUNDxCNT(x) (*(REGType32v *)(0x4000400 + ((int)x) * 0x10)) | ||
#define reg_SOUNDoffCNT(off) (*(REGType32v *)(0x4000400 + (int)(off))) | ||
#define reg_SOUNDxSAD(x) (*(REGType32v *)(0x4000404 + ((int)x) * 0x10)) | ||
#define reg_SOUNDoffSAD(off) (*(REGType32v *)(0x4000404 + (int)(off))) | ||
#define reg_SOUNDxTMR(x) (*(REGType16v *)(0x4000408 + ((int)x) * 0x10)) | ||
#define reg_SOUNDoffTMR(off) (*(REGType16v *)(0x4000408 + (int)(off))) | ||
#define reg_SOUNDxPNT(x) (*(REGType16v *)(0x400040A + ((int)x) * 0x10)) | ||
#define reg_SOUNDoffPNT(off) (*(REGType16v *)(0x400040A + (int)(off))) | ||
#define reg_SOUNDxLEN(x) (*(REGType32v *)(0x400040C + ((int)x) * 0x10)) | ||
#define reg_SOUNDoffLEN(off) (*(REGType32v *)(0x400040C + (int)(off))) | ||
|
||
#define reg_SNDCAPxCNT(x) (*(REGType8v *)(0x4000508 + ((int)(x)))) | ||
|
||
#define EXTKEYIN_X (1<<0) | ||
#define EXTKEYIN_Y (1<<1) | ||
#define EXTKEYIN_DEBUG (1<<3) | ||
#define EXTKEYIN_PEN (1<<6) | ||
#define EXTKEYIN_HINGE (1<<7) | ||
#define EXTKEYIN_X (1 << 0) | ||
#define EXTKEYIN_Y (1 << 1) | ||
#define EXTKEYIN_DEBUG (1 << 3) | ||
#define EXTKEYIN_PEN (1 << 6) | ||
#define EXTKEYIN_HINGE (1 << 7) | ||
|
||
#endif //POKEDIAMOND_ARM7_REGISTERS_H | ||
#endif // NITRO_REGISTERS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
#ifndef POKEDIAMOND_MI_DMA_CARD_H | ||
#define POKEDIAMOND_MI_DMA_CARD_H | ||
#ifndef NITRO_MI_DMA_CARD_H | ||
#define NITRO_MI_DMA_CARD_H | ||
|
||
#include "nitro/types.h" | ||
|
||
void MIi_CardDmaCopy32(u32 dmaNo, const void *src, void *dest, u32 size); | ||
|
||
#endif //POKEDIAMOND_MI_DMA_CARD_H | ||
#endif // NITRO_MI_DMA_CARD_H |
Oops, something went wrong.