Document number
204911
Version
Rev. K
Issue date
2016-10-11
Sirius Breadboard User Manual
www.aacmicrotec.com
Page
72
of
106
5.12.1. Description
This driver software for the SPI RAM IP, handles the initialization, configuration and access
of the NVRAM.
The NVRAM is divided into a system memory area and a user memory area. The system
memory start at SPI RAM address 0x100 and the user memory start at SPI RAM address
0x200.
5.12.2. RTEMS API
This API represents the driver interface of the module from an RTEMS user application's
perspective.
The driver functionality is accessed through the RTEMS POSIX API for ease of usage. In
case of a failure on a function call, the
errno
value is set for determining the cause.
5.12.2.1. Enum rtems_spi_ram_edac_e
Enumerator for the error correction and detection of the SPI RAM.
Enumerator
Description
SPI_RAM_IOCTL_EDAC_ENABLE
Error Correction and Detection
enabled.
SPI_RAM_IOCTL_EDAC_DISABLE Error Correction and Detection
disabled.
5.12.2.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
errno values
EINVAL
Invalid options
5.12.2.3. Function int close(...)
Closes access to the device.
Argument name
Type
Direction
Description
fd
int
in
File descriptor received at open.