Document number
205065
Version
Rev. N
Issue date
2019-02-04
Sirius OBC and TCM User Manual
Page
67
of
174
Table 5-5 - Open flag symbols
Symbol
Description
O_RDONLY
Open for reading only
O_WRONLY
Open writing only
O_RDWR
Open for reading and writing
5.7.2.2. int close
(…)
Deregisters the device name from data transactions.
Argument name
Type
Direction Description
fd
int
in
File descriptor received at
open
.
0
Device name deregistered
successfully
-1
see
errno
values
errno values
EBADF
The file descriptor
fd
is not
and open file descriptor.
5.7.2.3. ssize_t read
(…)
Reads a packet when available.
Note!
This call is blocked until a package for the logic address is received. In addition, only
one
task must access one file descriptor at a time. Multiple task accessing the same file
descriptor is not allowed.
Note!
buf reference
must
be aligned to a 32 bit aligned address.
Argument name
Type
Direction Description
fd
int
in
File descriptor received at
open
.
buf
void *
in
Character buffer where to store the packet
nbytes
size_t
in
Packet
size in bytes. Must be between 0 and
SPWN_MAX_PACKET_SIZE bytes
.