MI_CancelWram*

Syntax

#include <twl/mi.h>

void MI_CancelWram( MIWramPos wram, MIWramProc proc )
void MI_CancelWramSlot( MIWramPos wram, int slot, MIWramSize size, MIWramProc proc )

(#define)
MI_CancelWram_A( proc )
MI_CancelWram_B( proc )
MI_CancelWram_C( proc )
MI_CancelWramSlot_A( slot, size, proc )
MI_CancelWramSlot_B( slot, size, proc )
MI_CancelWramSlot_C( slot, size, proc )

Arguments

wram WRAM to cancel the reservation for.
slot Starting WRAM number of the region to cancel the reservation for.
size Size of the region to cancel the reservation for.
proc Processor to cancel the reservation for.

Return Values

The number of WRAM slots for which reservations were cancelled. 0 indicates that no reservations were cancelled. -1 indicates a failure.

Description

Cancels the reservation of the specified WRAM for a given processor.

It cancels a reservation for a region of WRAM that has been reserved with a MI_ReserveWram* function. It will cancel all reservations within the specified WRAM for the specified processor. It will cancel reservations even if that region is in use. Even if a reservation is cancelled, the master processor for the given region will not change, and its content will not be lost.

The wram argument indicates the target WRAM. This is of type MIWramPos, and will be MI_WRAM_A, MI_WRAM_B, or MI_WRAM_C.

The slot argument is the starting slot number for the region reservations are being cancelled for.

The size argument is the size of the region to cancel the reservation for.

The proc argument indicates which processor's reservations should be cancelled. This is of type MIWramProc and will be MI_WRAM_ARM9, MI_WRAM_ARM7, or MI_WRAM_DSP.

MI_CancelWram_A is the #define directive of MI_CancelWram( MI_WRAM_A, ... ).
MI_CancelWram_B is the #define directive of MI_CancelWram( MI_WRAM_B, ... ).
MI_CancelWram_C is the #define directive of MI_CancelWram( MI_WRAM_C, ... ).
MI_CancelWramSlot_A is the #define directive of MI_CancelWramSlot( MI_WRAM_A, ... ).
MI_CancelWramSlot_B is the #define directive of MI_CancelWramSlot( MI_WRAM_B, ... ).
MI_CancelWramSlot_C is the #define directive of MI_CancelWramSlot( MI_WRAM_C, ... ).

MI_CancelWram() frees all regions reserved for the specified processor within the specified WRAM.

MI_CancelWramSlot() specifies a region within the specified WRAM by its slot and size, and frees all regions contained therein that are reserved for the specified processor.


(Example) Here, we will cancel all reservations for the DSP in WRAM-C.

MI_CancelWram( MI_WRAM_C, MI_WRAM_DSP );
OR
MI_CancelWram_C( MI_WRAM_DSP );


(Example) Here, we will cancel all reservations for the DSP in the 96 KB area of WRAM-C that starts with slot 2.

MI_CancelWramSlot( MI_WRAM_C, 2, MI_WRAM_SIZE_96KB, MI_WRAM_DSP );
OR
MI_CancelWramSlot_C( 2, MI_WRAM_SIZE_96KB, MI_WRAM_DSP );


See Also

Overview (Work RAM), MI-Related Constants

Revision History

2007/08/20 Initial version.


CONFIDENTIAL