Document number
205065
Version
Rev. N
Issue date
2019-02-04
Sirius OBC and TCM User Manual
Page
95
of
174
Enumerator
Description
SPI_RAM_IOCTL_EDAC_ENABLE
Error Correction and Detection
enabled.
SPI_RAM_IOCTL_EDAC_DISABLE Error Correction and Detection
disabled.
5.11.4.2. Function int open(...)
Opens access to the requested SPI RAM.
Argument name
Type
Direction Description
pathname
const char *
in
The absolute path to the SPI RAM to be
opened. SPI RAM device is defined as
SPI_RAM_DEVICE_NAME.
flags
int
in
Access mode flag.
Return value
Description
fd
A file descriptor for the device
on success
-1
See
errno
values in [RD13]
5.11.4.3. 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
-1
See
errno
values in [RD13]
5.11.4.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. May also set errno EIO.