Software APIs
dif_rram_macro_autogen.h File Reference

RRAM_MACRO Device Interface Functions More...

#include <stdbool.h>
#include <stdint.h>
#include "sw/device/lib/base/macros.h"
#include "sw/device/lib/base/mmio.h"
#include "sw/device/lib/dif/dif_base.h"
#include "hw/top/dt/rram_macro.h"

Go to the source code of this file.

Data Structures

struct  dif_rram_macro
 A handle to rram_macro. More...
 

Typedefs

typedef struct dif_rram_macro dif_rram_macro_t
 A handle to rram_macro.
 

Functions

OT_WARN_UNUSED_RESULT dif_result_t dif_rram_macro_init (mmio_region_t base_addr, dif_rram_macro_t *rram_macro)
 Creates a new handle for a(n) rram_macro peripheral.
 
OT_WARN_UNUSED_RESULT dif_result_t dif_rram_macro_init_from_dt (dt_rram_macro_t dt, dif_rram_macro_t *rram_macro)
 Creates a new handle for a(n) rram_macro peripheral.
 
OT_WARN_UNUSED_RESULT dif_result_t dif_rram_macro_get_dt (const dif_rram_macro_t *rram_macro, dt_rram_macro_t *dt)
 Get the DT handle from this DIF.
 

Detailed Description

RRAM_MACRO Device Interface Functions

Definition in file dif_rram_macro_autogen.h.


Data Structure Documentation

◆ dif_rram_macro

struct dif_rram_macro

A handle to rram_macro.

This type should be treated as opaque by users.

Definition at line 37 of file dif_rram_macro_autogen.h.

Data Fields
mmio_region_t base_addr The base address for the rram_macro hardware registers.
dt_rram_macro_t dt The instance, set to kDtRramMacroCount if not initialized through dif_rram_macro_init_from_dt.

Typedef Documentation

◆ dif_rram_macro_t

A handle to rram_macro.

This type should be treated as opaque by users.

Function Documentation

◆ dif_rram_macro_get_dt()

OT_WARN_UNUSED_RESULT dif_result_t dif_rram_macro_get_dt ( const dif_rram_macro_t * rram_macro,
dt_rram_macro_t * dt )

Get the DT handle from this DIF.

If this DIF was initialized by dif_rram_macro_init_from_dt(dt, ..) then this function will return dt. Otherwise it will return an error.

Parameters
rram_macroA rram_macro handle.
[out]dtDT handle.
Returns
kDifBadArg if the DIF has no DT information, kDifOk otherwise.

Definition at line 52 of file dif_rram_macro_autogen.c.

◆ dif_rram_macro_init()

OT_WARN_UNUSED_RESULT dif_result_t dif_rram_macro_init ( mmio_region_t base_addr,
dif_rram_macro_t * rram_macro )

Creates a new handle for a(n) rram_macro peripheral.

This function does not actuate the hardware.

Parameters
base_addrThe MMIO base address of the rram_macro peripheral.
[out]rram_macroOut param for the initialized handle.
Returns
The result of the operation.

DEPRECATED This function exists solely for the transition to dt-based DIFs and will be removed in the future.

Definition at line 25 of file dif_rram_macro_autogen.c.

◆ dif_rram_macro_init_from_dt()

OT_WARN_UNUSED_RESULT dif_result_t dif_rram_macro_init_from_dt ( dt_rram_macro_t dt,
dif_rram_macro_t * rram_macro )

Creates a new handle for a(n) rram_macro peripheral.

This function does not actuate the hardware.

Parameters
dtThe devicetable description of the device.
[out]rram_macroOut param for the initialized handle.
Returns
The result of the operation.

Definition at line 39 of file dif_rram_macro_autogen.c.