Document number
205065
Version
Rev. N
Issue date
2019-02-04
Sirius OBC and TCM User Manual
Page
69
of
174
errno values
EBADF
The file descriptor
fd
is not an
open file descriptor.
EINVAL
Packet size is larger than
SPWN_MAX_PACKET_SIZE
.
EBUSY
Transmission already in
progress.
ETIMEDOUT
Failed to transmit the complete
packet.
EIO
Internal RTEMS resource error,
or internal transmission error.
5.7.2.5.
int ioctl(…)
Additional supported operations via POSIX Input/Output Control API.
Argument name
Type
Direction Description
fd
int
in
A file descriptor received at
open.
cmd
int
in
Command defined in subchapter 5.7.2.6
value
void *
in
The value relating to command operation as
defined in subchapter 5.7.2.6.
5.7.2.6. Mode setting
Sets the device into the given mode.
Note!
The mode setting affects the SpaceWire device and therefore all file descriptors
registered to it.
Return value
Description
0
Given mode was set
- 1
see
errno
values
errno values
Command
Value type Direction Description
SPWN_IOCTL_MODE_SET
uint32_t
in
Modes available:
•
SPWN_IOCTL_MODE_OFF: Turns off the
node.
•
SPWN_IOCTL_MODE_LOOPBACK: Internal
loopback mode
•
SPWN_IOCTL_MODE_NORMAL: Normal
mode.