AST 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_ast.h"
Go to the source code of this file.
Data Structures | |
struct | dif_ast |
A handle to ast. More... | |
Typedefs | |
typedef struct dif_ast | dif_ast_t |
A handle to ast. | |
Functions | |
OT_WARN_UNUSED_RESULT dif_result_t | dif_ast_init (mmio_region_t base_addr, dif_ast_t *ast) |
Creates a new handle for a(n) ast peripheral. | |
OT_WARN_UNUSED_RESULT dif_result_t | dif_ast_init_from_dt (dt_ast_t dt, dif_ast_t *ast) |
Creates a new handle for a(n) ast peripheral. | |
OT_WARN_UNUSED_RESULT dif_result_t | dif_ast_get_dt (const dif_ast_t *ast, dt_ast_t *dt) |
Get the DT handle from this DIF. | |
AST Device Interface Functions
Definition in file dif_ast_autogen.h.
struct dif_ast |
A handle to ast.
This type should be treated as opaque by users.
Definition at line 37 of file dif_ast_autogen.h.
Data Fields | ||
---|---|---|
mmio_region_t | base_addr | The base address for the ast hardware registers. |
dt_ast_t | dt |
The instance, set to kDtAstCount if not initialized through dif_ast_init_from_dt . |
OT_WARN_UNUSED_RESULT dif_result_t dif_ast_get_dt | ( | const dif_ast_t * | ast, |
dt_ast_t * | dt ) |
Get the DT handle from this DIF.
If this DIF was initialized by dif_ast_init_from_dt(dt, ..)
then this function will return dt
. Otherwise it will return an error.
ast | A ast handle. | |
[out] | dt | DT handle. |
kDifBadArg
if the DIF has no DT information, kDifOk
otherwise. Definition at line 52 of file dif_ast_autogen.c.
OT_WARN_UNUSED_RESULT dif_result_t dif_ast_init | ( | mmio_region_t | base_addr, |
dif_ast_t * | ast ) |
Creates a new handle for a(n) ast peripheral.
This function does not actuate the hardware.
base_addr | The MMIO base address of the ast peripheral. | |
[out] | ast | Out param for the initialized handle. |
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_ast_autogen.c.
OT_WARN_UNUSED_RESULT dif_result_t dif_ast_init_from_dt | ( | dt_ast_t | dt, |
dif_ast_t * | ast ) |
Creates a new handle for a(n) ast peripheral.
This function does not actuate the hardware.
dt | The devicetable description of the device. | |
[out] | ast | Out param for the initialized handle. |
Definition at line 39 of file dif_ast_autogen.c.