Document number
205065
Version
Rev. N
Issue date
2019-02-04
Sirius OBC and TCM User Manual
Page
38
of
174
5.4.4.1. Function int open
(…)
Opens access to the driver. The device driver allows multiple readers but only one writer at
a time.
Argument name
Type
Direction Description
filename
char *
in
The absolute path to the file that is to be
opened. SCET device is defined as
RTEMS_SCET_DEVICE_NAME.
oflags
int
in
A bitwise OR-separated list of values that
determine the method in which the file is to be
opened (whether it should be read only,
read/write, etc.).
Return value
Description
>0
A file descriptor for the device
on success
-1
see
errno
values
errno values
EALREADY
Device already opened for
writing
EIO
Internal RTEMS error
5.4.4.2. Function int close
(…)
Closes access to the device.
Argument name
Type
Direction Description
fd
int
in
File descriptor received at
open
Return value
Description
0
Device closed successfully
5.4.4.3. Function ssize_t read(
…
)
Reads the current SCET value, consisting of second and subsecond counters. Both counter
values are guaranteed to be sampled at the same moment.
Argument name
Type
Direction Description
fd
int
in
File descriptor received at open.
buf
void *
in
Pointer to a 6-byte buffer where the timestamp
will be stored. The first four bytes are the
seconds and the last two bytes are the
subseconds.