This module contains APIs to program and use the Ram module on the board like GPMC pSRAM. See RAM for more details.
|
typedef int32_t(* | Ram_OpenFxn) (Ram_Config *config) |
| Driver implementation to open a specific RAM driver. More...
|
|
typedef void(* | Ram_CloseFxn) (Ram_Config *config) |
| Driver implementation to close a specific RAM driver. More...
|
|
typedef int32_t(* | Ram_ReadFxn) (Ram_Config *config, uint32_t offset, uint8_t *buf, uint32_t len) |
| Driver implementation to read from RAM using a specific RAM driver. More...
|
|
typedef int32_t(* | Ram_WriteFxn) (Ram_Config *config, uint32_t offset, uint8_t *buf, uint32_t len) |
| Driver implementation to write to RAM using specific RAM driver. More...
|
|
typedef int32_t(* | Ram_quirksFxn) (Ram_Config *config) |
| Ram device config. This will be part of the ram config, so has to be filled by sysconfig or otherwise before invoking Ram_open. More...
|
|
typedef int32_t(* | Ram_custProtocolFxn) (Ram_Config *config) |
| User implementation of a custom function to configure RAM to operate in a specific protocol. More...
|
|
◆ Ram_Handle
◆ Ram_Config
◆ Ram_Params
◆ Ram_OpenFxn
typedef int32_t(* Ram_OpenFxn) (Ram_Config *config) |
Driver implementation to open a specific RAM driver.
Typically this callback is hidden from the end application and is implemented when a new type of RAM device needs to be implemented.
- Parameters
-
config | [in] RAM configuration for the specific RAM device |
params | [in] User controllable parameters when opening the RAM device |
- Returns
- SystemP_SUCCESS on success, else failure
◆ Ram_CloseFxn
Driver implementation to close a specific RAM driver.
Typically this callback is hidden from the end application and is implemented when a new type of RAM device needs to be implemented.
- Parameters
-
config | [in] RAM configuration for the specific RAM device |
- Returns
- SystemP_SUCCESS on success, else failure
◆ Ram_ReadFxn
typedef int32_t(* Ram_ReadFxn) (Ram_Config *config, uint32_t offset, uint8_t *buf, uint32_t len) |
Driver implementation to read from RAM using a specific RAM driver.
Typically this callback is hidden from the end application and is implemented when a new type of RAM device needs to be implemented.
- Parameters
-
config | [in] RAM configuration for the specific RAM device |
offset | [in] Offset in the RAM from where to start the read |
buf | [in] Buffer into which to read the data into |
len | [in] Length of the data to read, in bytes |
- Returns
- SystemP_SUCCESS on success, else failure
◆ Ram_WriteFxn
typedef int32_t(* Ram_WriteFxn) (Ram_Config *config, uint32_t offset, uint8_t *buf, uint32_t len) |
Driver implementation to write to RAM using specific RAM driver.
Typically this callback is hidden from the end application and is implemented when a new type of RAM device needs to be implemented.
- Parameters
-
config | [in] RAM configuration for the specific RAM device |
offset | [in] Offset in the RAM from where to start the write. |
buf | [in] Buffer which has the data to write. |
len | [in] Length of the data to write, in bytes |
- Returns
- SystemP_SUCCESS on success, else failure
◆ Ram_quirksFxn
typedef int32_t(* Ram_quirksFxn) (Ram_Config *config) |
Ram device config. This will be part of the ram config, so has to be filled by sysconfig or otherwise before invoking Ram_open.
User implementation of a custom function to handle vendor specific quirks
Typically this callback is hidden from the end application and is implemented when a new type of RAM device needs to be implemented.
- Parameters
-
config | [in] RAM configuration for the specific RAM device |
- Returns
- SystemP_SUCCESS on success, else failure
◆ Ram_custProtocolFxn
typedef int32_t(* Ram_custProtocolFxn) (Ram_Config *config) |
User implementation of a custom function to configure RAM to operate in a specific protocol.
- Parameters
-
config | [in] RAM configuration for the specific RAM device |
- Returns
- SystemP_SUCCESS on success, else failure
◆ Ram_getAttrs()
Ram_Attrs* Ram_getAttrs |
( |
uint32_t |
instanceId | ) |
|
◆ Ram_open()
Open RAM driver.
Make sure the SOC peripheral driver is opened before calling this API. Drivers_open function generated by SysCfg opens the underlying SOC peripheral driver, e.g OSPI.
Global variables RAM_Config gRAMConfig[]
and uint32_t gRAMConfigNum
is instantiated by SysCfg to describe the RAM configuration based on user selection in SysCfg.
- Parameters
-
instanceId | [in] Index within RAM_Config gRAMConfig[] denoting the RAM driver to open |
params | [in] Open parameters |
- Returns
- Handle to RAM driver which should be used in subsequent API call
-
NULL in case of failure
◆ Ram_close()
Close RAM driver.
- Parameters
-
handle | [in] RAM driver handle from Ram_open |
◆ Ram_write()
int32_t Ram_write |
( |
Ram_Handle |
handle, |
|
|
uint32_t |
offset, |
|
|
uint8_t * |
buf, |
|
|
uint32_t |
len |
|
) |
| |
Write to RAM device.
- Parameters
-
handle | [in] RAM driver handle from Ram_open |
offset | [in] Offset in the RAM from where to start the write. |
buf | [in] Buffer which has the data to write. |
len | [in] Length of the data to write, in bytes |
- Returns
- SystemP_SUCCESS on success, else failure
◆ Ram_read()
int32_t Ram_read |
( |
Ram_Handle |
handle, |
|
|
uint32_t |
offset, |
|
|
uint8_t * |
buf, |
|
|
uint32_t |
len |
|
) |
| |
Read data from RAM device.
- Parameters
-
handle | [in] RAM driver handle from Ram_open |
offset | [in] Offset in the RAM from where to start the read |
buf | [in] Buffer into which to read the data into |
len | [in] Length of the data to read, in bytes |
- Returns
- SystemP_SUCCESS on success, else failure