osEepromLongRead.3p 1.51 KB
.TH osEepromLongRead 3P local "Silicon Graphics, Inc."
.SH NAME
.upperok
osEepromLongRead, osEepromLongWrite \- read/write multiple blocks of data from/to EEPROM
.SH SYNOPSIS
.nf
\f3
.Op c
#include <ultra64.h>
.sp .8v
s32 osEepromLongRead(OSMesgQueue \(**mq, u8 address, u8 \(**buffer, 
                     int nbytes);
.sp .8v
s32 osEepromLongWrite(OSMesgQueue \(**mq, u8 address, u8 \(**buffer, 
                     int nbytes);
.Op
\f1
.fi
.SH DESCRIPTION
The
.I osEepromLongRead
call issues EEPROM read commands to obtain 
.I nbytes
of data from the address
specified by 
.I address,
and the
.I osEepromLongWrite
call issues EEPROM write commands to write 
.I nbytes
of data to the address
specified by 
.I address.
The user must supply a block of memory large enough for  
.I nbytes.
Due to a hardware restriction, the transfer size
.I nbytes
should be a multiple of 8.
The message queue
.I mq
must be an initialized message queue associated with the
.I OS_EVENT_SI
event.
See
.IR osSetEventMesg (3P)
for details on how to create this association. Note that
.I address
is the EEPROM block address and each EEPROM block contains 8 bytes of data.
.sp
Since the EEPROM command will take around 15 milliseconds to complete,
a timer is set up between EEPROM commands to avoid
waiting in the busy loop. 
In addition, 
.IR osContInit (3P)
must be called to initialize the low level synchronization before 
osEepromLongRead/osEepromLongWrite can be used.
.SH "SEE ALSO"
osContInit (3P),
osEepromProbe (3p),
osEepromRead (3p),
osEepromWrite (3p).