-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented support for hdma and sound dma with rom source
- Loading branch information
Showing
16 changed files
with
335 additions
and
85 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#pragma once | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
static inline u32 arm_getCpsr() | ||
{ | ||
u32 cpsr; | ||
asm volatile("mrs %0, cpsr" : "=r" (cpsr)); | ||
return cpsr; | ||
} | ||
|
||
static inline void arm_setCpsrControl(u32 cpsrControl) | ||
{ | ||
asm volatile("msr cpsr_c, %0" :: "r" (cpsrControl) : "cc"); | ||
} | ||
|
||
static inline u32 arm_disableIrqs(void) | ||
{ | ||
u32 oldCpsr = arm_getCpsr(); | ||
arm_setCpsrControl(oldCpsr | 0x80); | ||
return oldCpsr; | ||
} | ||
|
||
static inline u32 arm_enableIrqs(void) | ||
{ | ||
u32 oldCpsr = arm_getCpsr(); | ||
arm_setCpsrControl(oldCpsr & ~0x80); | ||
return oldCpsr; | ||
} | ||
|
||
static inline void arm_restoreIrqs(u32 oldCpsr) | ||
{ | ||
arm_setCpsrControl(oldCpsr); | ||
} | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |
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,4 +1,4 @@ | ||
#pragma once | ||
|
||
#define DTCM_STACK_SIZE (1024 - 32) | ||
#define DTCM_IRQ_STACK_SIZE (128 + 32) | ||
#define DTCM_IRQ_STACK_SIZE (256 + 32) |
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
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
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
Oops, something went wrong.