Document number
205065
Version
Rev. N
Issue date
2019-02-04
Sirius OBC and TCM User Manual
Page
53
of
174
Type
Name
Purpose
uint32_t
page_num
What page to write
uint8_t *
data_buf
Pointer to data to write
uint32_t
size
Size of data to write in bytes
massmem_error_injection_t * error_injection Pointer to error injection struct. See 5.6.2.2 for definition
5.6.3. RTEMS API
5.6.3.1.
int open(…)
Opens access to the driver. The device can only be opened once at a time.
Argument name
Type
Direction Description
filename
char *
in
The absolute path to the file that is to be
opened. Mass memory device is defined as
MASSMEM_DEVICE_NAME.
oflags
int
in
Device must be opened by exactly one of the
symbols defined in Table 5-4.
Return value
Description
>0
A file descriptor for the
device.
- 1
see
errno
values
errno values
EBADF
The file descriptor
fd
is not an
open file descriptor
ENOENT
Invalid filename
EEXIST
Device already opened.
Table 5-4 - Open flag symbols
Symbol
Description
O_RDONLY
Open for reading only
O_WRONLY
Open writing only
O_RDWR
Open for reading and writing