osEepromLongRead.3p
1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
.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).