Document number
205065
Version
Rev. N
Issue date
2019-02-04
Sirius OBC and TCM User Manual
Page
96
of
174
-1
See
errno
values
errno values
EINVAL
Invalid options
ENODEV
Internal RTEMS resource
error.
EIO and >= 0 return
value
Read was successful and a
single or double-bit error was
corrected using EDAC.
The corrected value has NOT
been re-written.
EIO and -1 return
value
Multi-bit uncorrectable read
error.
5.11.4.5. Function ssize_t write(...)
Write data into the SPI RAM. The call block until all data has been written into the SPI RAM.
Argument name
Type
Direction Description
fd
int
in
File descriptor received at open.
buf
void*
in
Pointer to character buffer to read data from.
count
size_t
in
Number of bytes to write. Must be a multiple of
4.
Return value
Description
>=0
Number of bytes that were
written.
-1
See
errno
values
errno values
EINVAL
Invalid options
ENODEV
Internal RTEMS resource
error.
5.11.4.6. Function int lseek(...)
Set the address for the read/write operations.
Argument name
Type
Direction Description
fd
int
in
File descriptor received at open.
offset
void*
in
SPI RAM read/write byte offset. Must be a
multiple of 4.
whence
int
in
SEEK_SET and SEEK_CUR are supported.
Return value
Description
>=0
Byte offset
-1
See
errno
values in [RD13]