N64® Functions Menu
|
al - Audio Library Functions
gDP - DP GBI Macros
gdSP - General GBI Macros
gSP - SP GBI Macros
gt - Turbo Microcode RDP
gu - Graphics Utilities
Math - Math Functions
nuSys - NuSystem
os - N64 Operating System
sp - Sprite Library Functions
uh - Host to Target IO
64DD - N64 Disk Drive
|
|
osEepromLongRead
osEepromLongWrite
Format
#include <ultra64.h>
s32 osEepromLongRead(OSMesgQueue *mq, u8 address, u8 *buffer, int nbytes);
s32 osEepromLongWrite(OSMesgQueue *mq, u8 address, u8 *buffer, int nbytes);
What These Functions Do
The osEepromLongRead and osEepromLongWrite functions read and write multiple 8-byte blocks of data to or from an address in the EEPROM (0-63 for a 4K-EEPROM or 0-255 for a 16K-EEPROM).
The osEepromLongRead function issues EEPROM read commands to obtain nbytes of
data from the address specified by the address argument. Actually, it just calls the osEepromRead function the number of times specified by the nbytes argument.
The osEepromLongWrite function issues EEPROM write commands to write nbytes of data to the address specified by the address argument. Actually, it just calls the osEepromWrite function the number of times specified by the nbytes argument.
You must supply a block of memory large enough for nbytes. Due to a hardware restriction, the transfer size (nbytes) must be a multiple of 8.
The message queue (mq) must be an initialized
message queue associated with the OS_EVENT_SI event. See the osSetEventMesg functions for details on how to create this association.
Note that address argument specifies an EEPROM block address, and each EEPROM block contains 8 bytes of data. Because each block is an 8-byte unit, you must specify a value for the address argument that is the actual address divided by 8.
Because a write command for EEPROM takes about 15 milliseconds to complete, osEepromLongWrite uses a timer internally between EEPROM commands to avoid waiting in the busy loop.
Note that you must call the osContInit function to initialize the low-level synchronization before you call osEepromLongRead or osEepromLongWrite.
See Also
osContInit
osEepromProbe
osEepromRead
osEepromWrite
|
Nintendo® Confidential
Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.
Copyright © 1998
Nintendo of America Inc. All rights reserved Nintendo and N64 are registered trademarks of Nintendo
Last updated January 1998
|
|