#include <twl/mi.h>
u8 MI_GetFreeWramSlot( MIWramPos wram );
(define)
#define MI_GetFreeWramSlot_A();
#define MI_GetFreeWramSlot_B();
#define MI_GetFreeWramSlot_C();
wram | WRAM to get information about. |
Returns information about the slots within the specified WRAM that are not reserved for or allocated by any processor. Returns slot values ranging from 0 to 3 for WRAM-A, or slot values ranging from 0 to 7 for WRAM-B and WRAM-C.
Gets information about the slots within the specified WRAM that are not reserved for or allocated by any processor.
The separate MI_IsWramSlotUsed
function has been created for finding out whether a single slot has been assigned.
About the return values:
The lower bits of the u8
value indicate slot 0, slot 1, and so on (in order). If a given bit is 1, it means that the corresponding slot is neither reserved nor allocated.
For example, if the return value of MI_GetFreeWramSlot( MI_WRAM_B )
is 0xC0
(11000000 in binary), this indicates that WRAM-B slots 0, 1, 2, 3, 4, and 5 have been either reserved for or allocated by some processor, and that slots 6 and 7 have not been reserved for or allocated by any of the processors.
Convenience functions that include the WRAM type in the function name:
MI_GetFreeWramSlot_A(...)
is the #define
directive of MI_GetFreeWramSlot( MI_WRAM_A, ... )
.MI_GetFreeWramSlot_B(...)
is the #define
directive of MI_GetFreeWramSlot( MI_WRAM_B, ... )
.MI_GetFreeWramSlot_C(...)
is the #define
directive of MI_GetFreeWramSlot( MI_WRAM_C, ... )
.
The WRAM manager managed by the ARM9 determines the return value.
The ARM7 gets values from the ARM9 through PXI.
This function is implemented by specifying MI_WRAM_FREE
as the processor type of the MI_GetAllocatableWramSlot
function.
Overview: Work RAM
MI-Related Constants
MI_GetAllocatableWramSlot
MI_GetUsedWramSlot
MI_IsWramSlotUsed
2008/05/29 Initial version.
CONFIDENTIAL