Software APIs
Data Structures | Typedefs | Enumerations | Functions
dif_pwm_autogen.h File Reference

(c534d13)

PWM 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"

Go to the source code of this file.

Data Structures

struct  dif_pwm
 A handle to pwm. More...
 

Typedefs

typedef struct dif_pwm dif_pwm_t
 A handle to pwm. More...
 
typedef enum dif_pwm_alert dif_pwm_alert_t
 A pwm alert type.
 

Enumerations

enum  dif_pwm_alert { kDifPwmAlertFatalFault = 0 }
 A pwm alert type. More...
 

Functions

OT_WARN_UNUSED_RESULT dif_result_t dif_pwm_init (mmio_region_t base_addr, dif_pwm_t *pwm)
 Creates a new handle for a(n) pwm peripheral. More...
 
OT_WARN_UNUSED_RESULT dif_result_t dif_pwm_alert_force (const dif_pwm_t *pwm, dif_pwm_alert_t alert)
 Forces a particular alert, causing it to be escalated as if the hardware had raised it. More...
 

Detailed Description

PWM Device Interface Functions

Definition in file dif_pwm_autogen.h.


Data Structure Documentation

◆ dif_pwm

struct dif_pwm

A handle to pwm.

This type should be treated as opaque by users.

Definition at line 32 of file dif_pwm_autogen.h.

Data Fields
mmio_region_t base_addr The base address for the pwm hardware registers.

Typedef Documentation

◆ dif_pwm_t

typedef struct dif_pwm dif_pwm_t

A handle to pwm.

This type should be treated as opaque by users.

Enumeration Type Documentation

◆ dif_pwm_alert

A pwm alert type.

Enumerator
kDifPwmAlertFatalFault 

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

Definition at line 54 of file dif_pwm_autogen.h.

Function Documentation

◆ dif_pwm_alert_force()

OT_WARN_UNUSED_RESULT dif_result_t dif_pwm_alert_force ( const dif_pwm_t pwm,
dif_pwm_alert_t  alert 
)

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

Parameters
pwmA pwm handle.
alertThe alert to force.
Returns
The result of the operation.

Definition at line 27 of file dif_pwm_autogen.c.

◆ dif_pwm_init()

OT_WARN_UNUSED_RESULT dif_result_t dif_pwm_init ( mmio_region_t  base_addr,
dif_pwm_t pwm 
)

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

This function does not actuate the hardware.

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

Definition at line 17 of file dif_pwm_autogen.c.