Software APIs
dif_pinmux_autogen.h File Reference

PINMUX 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 "dt/dt_pinmux.h"

Go to the source code of this file.

Data Structures

struct  dif_pinmux
 A handle to pinmux. More...
 

Typedefs

typedef struct dif_pinmux dif_pinmux_t
 A handle to pinmux.
 
typedef enum dif_pinmux_alert dif_pinmux_alert_t
 A pinmux alert type.
 

Enumerations

enum  dif_pinmux_alert { kDifPinmuxAlertFatalFault = 0 }
 A pinmux alert type. More...
 

Functions

OT_WARN_UNUSED_RESULT dif_result_t dif_pinmux_init (mmio_region_t base_addr, dif_pinmux_t *pinmux)
 Creates a new handle for a(n) pinmux peripheral.
 
OT_WARN_UNUSED_RESULT dif_result_t dif_pinmux_init_from_dt (dt_pinmux_t dt, dif_pinmux_t *pinmux)
 Creates a new handle for a(n) pinmux peripheral.
 
OT_WARN_UNUSED_RESULT dif_result_t dif_pinmux_get_dt (const dif_pinmux_t *pinmux, dt_pinmux_t *dt)
 Get the DT handle from this DIF.
 
OT_WARN_UNUSED_RESULT dif_result_t dif_pinmux_alert_force (const dif_pinmux_t *pinmux, dif_pinmux_alert_t alert)
 Forces a particular alert, causing it to be escalated as if the hardware had raised it.
 

Detailed Description

PINMUX Device Interface Functions

Definition in file dif_pinmux_autogen.h.


Data Structure Documentation

◆ dif_pinmux

struct dif_pinmux

A handle to pinmux.

This type should be treated as opaque by users.

Definition at line 38 of file dif_pinmux_autogen.h.

Data Fields
mmio_region_t base_addr The base address for the pinmux hardware registers.
dt_pinmux_t dt The instance, set to kDtPinmuxCount if not initialized through dif_pinmux_init_from_dt.

Typedef Documentation

◆ dif_pinmux_t

typedef struct dif_pinmux dif_pinmux_t

A handle to pinmux.

This type should be treated as opaque by users.

Enumeration Type Documentation

◆ dif_pinmux_alert

A pinmux alert type.

Enumerator
kDifPinmuxAlertFatalFault 

This fatal alert is triggered when a fatal TL-UL bus integrity fault is detected.

Definition at line 99 of file dif_pinmux_autogen.h.

Function Documentation

◆ dif_pinmux_alert_force()

OT_WARN_UNUSED_RESULT dif_result_t dif_pinmux_alert_force ( const dif_pinmux_t * pinmux,
dif_pinmux_alert_t alert )

Forces a particular alert, causing it to be escalated as if the hardware had raised it.

Parameters
pinmuxA pinmux handle.
alertThe alert to force.
Returns
The result of the operation.

Definition at line 63 of file dif_pinmux_autogen.c.

◆ dif_pinmux_get_dt()

OT_WARN_UNUSED_RESULT dif_result_t dif_pinmux_get_dt ( const dif_pinmux_t * pinmux,
dt_pinmux_t * dt )

Get the DT handle from this DIF.

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

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

Definition at line 53 of file dif_pinmux_autogen.c.

◆ dif_pinmux_init()

OT_WARN_UNUSED_RESULT dif_result_t dif_pinmux_init ( mmio_region_t base_addr,
dif_pinmux_t * pinmux )

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

This function does not actuate the hardware.

Parameters
base_addrThe MMIO base address of the pinmux peripheral.
[out]pinmuxOut 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 26 of file dif_pinmux_autogen.c.

◆ dif_pinmux_init_from_dt()

OT_WARN_UNUSED_RESULT dif_result_t dif_pinmux_init_from_dt ( dt_pinmux_t dt,
dif_pinmux_t * pinmux )

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

This function does not actuate the hardware.

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

Definition at line 40 of file dif_pinmux_autogen.c.