Document number
204911
Version
Rev. K
Issue date
2016-10-11
Sirius Breadboard User Manual
www.aacmicrotec.com
Page
73
of
106
Return value
Description
0
Device closed successfully
-1
See
errno
values
errno values
EINVAL
Invalid options
5.12.2.4. Function ssize_t read(...)
Read data from the SPI RAM. The call block until all data has been received from the SPI
RAM.
Argument name
Type
Direction
Description
fd
int
in
File descriptor received at open.
buf
void*
in
Pointer to character buffer to write data into.
count
size_t
in
Number of bytes to read. Must be a multiple of
4.
Return value
Description
>=0
Number of bytes that were
read.
-1
See
errno
values
errno values
EINVAL
Invalid options
5.12.2.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
5.12.2.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.