osFlashReadArray [Function]

Reads from Flash pages.

Syntax

#include <ultra64.h>
s32  osFlashReadArray(OSIoMesg *mb, s32 priority, u32 page_num,
                         void *dramAddr, u32 n_pages, OSMesgQueue *mq);

Description

This is a function that read data written in 1M Flash.

The arguments are Message request block (*mb), Request priority (priority), The page number where reading starts (page_num), Buffer address to be read, Buffer address to be read (*dramAddr), the number of pages read (n_pages) and DMA end receiving message queue (*mq) accordingly.

For the return values, return -1 when PI manager is not executed, otherwise return the status of either osSendMesg or osJamMesg.

The use method is basically in the form that is in accordance with s32 osPiStartDma(OSIoMesg *mb, s32 priority, s32 direction, u32 devAddr,void *dramAddr, u32 size, OSMesgQueue *mq).  The following are the points which differ from osPiStartDma.

*There is no argument "direction" (because it is exclusively for read)
*There is a reading page number " n_pages" instead of the argument "size"
*Instead of the argument "devAddr," the page number where reading starts " page_num" is the argument.

When one execution of DMA does not fit in each 32K byte unit of page 0x0~0xff, 0x100~0x1ff, 0x200~0x2ff and 0x300~0x3ff, DMA is divided multiple times and executed in the library.

Reference

Revision History

07/07/2000  This function was added.