osEepromRead.3p 1.42 KB
.TH osEepromRead 3P local "Silicon Graphics, Inc."
.SH NAME
.upperok
osEepromRead, osEepromWrite \- read/write data from/to EEPROM
.SH SYNOPSIS
.nf
\f3
.Op c
#include <ultra64.h>
.sp .8v
s32 osEepromRead(OSMesgQueue \(**mq, u8 address, u8 \(**buffer);
.sp .8v
s32 osEepromWrite(OSMesgQueue \(**mq, u8 address, u8 \(**buffer);
.Op
\f1
.fi
.SH DESCRIPTION
The
.I osEepromRead
call issues a read EEPROM command to obtain 8 bytes of data from the address
specified by 
.I address,
and the
.I osEepromWrite
call issues a write EEPROM command to write 8 bytes of data to the address
specified by 
.I address.
The user must supply a block of memory large enough for  8 bytes.
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
The EEPROM command will take around 15 milliseconds to finish.
Thus, to avoid a reduction in overall system performance, a timer should be set up between osEepromRead/osEepromWrite commands. See 
.IR osSetTimer (3p)
for details on how to start a countdown timer.
In addition, 
.IR osContInit (3P)
must be called to initialize the low level synchronization before 
osEepromRead/osEepromWrite can be used.
.SH "SEE ALSO"
osContInit (3P),
osEepromProbe (3p),
osEepromLongRead (3p),
osEepromLongWrite (3p).