osFlashWriteBuffer [Function]

Writes into Flash buffer

Syntax

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

Description

This is a function that writes data into 1M Flash write buffer by DMA.

The arguments are Message request block (*mb), Request priority (priority), Buffer address (*dramAddr) and DMA end message queue (*mq) accordingly.

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

The use method is basically in the form in accordance with

s32 osPiStartDma(OSIoMesg *mb, s32 priority, s32 direction, u32 devAddr,
void *dramAddr, u32 size, OSMesgQueue *mq)
.

The following are the points different from osPiStartDma:

There is no argument "direction" (because it is exclusively for write).
There is no argument "devAddr" (because the buffer address of 1M Flash are fixed).
There is no argument "size" (because the size to be read is fixed at 128 bytes per page).

Follow the procedure listed below in order to write data in specific pages of 1M Flash:

(1) Delete data
(2) Transfer data from RDRAM to the write buffer in 1M Flash
(3) Transfer data from the write buffer to each page of 1M Flash

This function is used to operate (2) listed above.

Reference

Revision History

07/07/2000  This function was added.