#include <nitro/card.h>
void CARD_ReadRom(u32 dma, const void *src, void *dst, u32 len);
dma | The DMA channel to be used for transfer. If it is out of range, CPU transfer will be used.If a valid DMA channel is specified, that DMA channel will not be available for any other task until transfer is complete. The card access transfer source is an IO register, so DMA Channel 0 cannot be specified. |
src | The transfer source CARD ROM address. |
dst | Transfer destination memory address |
len | Byte length of data being read |
None
This function synchronously reads data from a device that has ROM. The access bus must be locked before using this function. This function is equivalent to calling the CARD_ReadRomAsync
function with no callback specification and unconditionally waiting for it to complete.
For details on the internal operation of this function, see the description of the CARD_ReadRomAsync
function.
If a valid DMA channel is specified by this function, that DMA channel will not be available until transfer is complete.
Note that because this function uses interrupts internally, the process will not complete if it attempts to run while interrupts are prohibited.
CARD_LockRom, CARD_ReadRomAsync
04/28/2005 Added explanation that DMA channel 0 cannot be specified
11/02/2004 Corrected an argument name.
07/13/2004 Added caution concerning use with DMA.
07/09/2004 Revised description due to change in function format.
07/05/2004 Initial version.