Software APIs
dt_ast.h File Reference

Device Tables (DT) for IP ast and top earlgrey. More...

#include "dt_api.h"
#include <stdint.h>

Go to the source code of this file.

Typedefs

typedef enum dt_ast dt_ast_t
 List of instances.
 
typedef enum dt_ast_reg_block dt_ast_reg_block_t
 List of register blocks.
 
typedef enum dt_ast_clock dt_ast_clock_t
 List of clock ports.
 
typedef enum dt_ast_reset dt_ast_reset_t
 List of reset ports.
 

Enumerations

enum  dt_ast {
  kDtAst = 0 ,
  kDtAstFirst = 0 ,
  kDtAstCount = 1
}
 List of instances. More...
 
enum  dt_ast_reg_block {
  kDtAstRegBlockCore = 0 ,
  kDtAstRegBlockCount = 1
}
 List of register blocks. More...
 
enum  dt_ast_clock {
  kDtAstClockAstTlul = 0 ,
  kDtAstClockAstAdc = 1 ,
  kDtAstClockAstAlert = 2 ,
  kDtAstClockAstEs = 3 ,
  kDtAstClockAstRng = 4 ,
  kDtAstClockAstUsb = 5 ,
  kDtAstClockCount = 6
}
 List of clock ports. More...
 
enum  dt_ast_reset {
  kDtAstResetAstTlul = 0 ,
  kDtAstResetAstAdc = 1 ,
  kDtAstResetAstAlert = 2 ,
  kDtAstResetAstEs = 3 ,
  kDtAstResetAstRng = 4 ,
  kDtAstResetAstUsb = 5 ,
  kDtAstResetCount = 6
}
 List of reset ports. More...
 

Functions

dt_ast_t dt_ast_from_instance_id (dt_instance_id_t inst_id)
 Get the ast instance from an instance ID.
 
dt_instance_id_t dt_ast_instance_id (dt_ast_t dt)
 Get the instance ID of an instance.
 
uint32_t dt_ast_reg_block (dt_ast_t dt, dt_ast_reg_block_t reg_block)
 Get the register base address of an instance.
 
dt_clock_t dt_ast_clock (dt_ast_t dt, dt_ast_clock_t clk)
 Get the clock signal connected to a clock port of an instance.
 
dt_reset_t dt_ast_reset (dt_ast_t dt, dt_ast_reset_t rst)
 Get the reset signal connected to a reset port of an instance.
 

Detailed Description

Device Tables (DT) for IP ast and top earlgrey.

This file contains the type definitions and global functions of the ast.

Definition in file dt_ast.h.

Typedef Documentation

◆ dt_ast_clock_t

List of clock ports.

Clock ports are guaranteed to be numbered consecutively from 0.

◆ dt_ast_reg_block_t

List of register blocks.

Register blocks are guaranteed to start at 0 and to be consecutively numbered.

◆ dt_ast_reset_t

List of reset ports.

Reset ports are guaranteed to be numbered consecutively from 0.

Enumeration Type Documentation

◆ dt_ast

enum dt_ast

List of instances.

Enumerator
kDtAst 

ast

Definition at line 23 of file dt_ast.h.

◆ dt_ast_clock

List of clock ports.

Clock ports are guaranteed to be numbered consecutively from 0.

Enumerator
kDtAstClockAstTlul 

Clock port clk_ast_tlul_i.

kDtAstClockAstAdc 

Clock port clk_ast_adc_i.

kDtAstClockAstAlert 

Clock port clk_ast_alert_i.

kDtAstClockAstEs 

Clock port clk_ast_es_i.

kDtAstClockAstRng 

Clock port clk_ast_rng_i.

kDtAstClockAstUsb 

Clock port clk_ast_usb_i.

Definition at line 47 of file dt_ast.h.

◆ dt_ast_reg_block

List of register blocks.

Register blocks are guaranteed to start at 0 and to be consecutively numbered.

Definition at line 34 of file dt_ast.h.

◆ dt_ast_reset

List of reset ports.

Reset ports are guaranteed to be numbered consecutively from 0.

Enumerator
kDtAstResetAstTlul 

Reset port rst_ast_tlul_ni.

kDtAstResetAstAdc 

Reset port rst_ast_adc_ni.

kDtAstResetAstAlert 

Reset port rst_ast_alert_ni.

kDtAstResetAstEs 

Reset port rst_ast_es_ni.

kDtAstResetAstRng 

Reset port rst_ast_rng_ni.

kDtAstResetAstUsb 

Reset port rst_ast_usb_ni.

Definition at line 62 of file dt_ast.h.

Function Documentation

◆ dt_ast_clock()

Get the clock signal connected to a clock port of an instance.

Parameters
dtInstance of ast.
clkClock port.
Returns
Clock signal.

Definition at line 83 of file dt_ast.c.

◆ dt_ast_from_instance_id()

dt_ast_t dt_ast_from_instance_id ( dt_instance_id_t inst_id)

Get the ast instance from an instance ID.

For example, dt_uart_from_instance_id(kDtInstanceIdUart3) == kDtUart3.

Parameters
inst_idInstance ID.
Returns
A ast instance.

Note: This function only makes sense if the instance ID has device type ast, otherwise the returned value is unspecified.

Definition at line 61 of file dt_ast.c.

◆ dt_ast_instance_id()

dt_instance_id_t dt_ast_instance_id ( dt_ast_t dt)

Get the instance ID of an instance.

Parameters
dtInstance of ast.
Returns
The instance ID of that instance.

Definition at line 68 of file dt_ast.c.

◆ dt_ast_reg_block()

uint32_t dt_ast_reg_block ( dt_ast_t dt,
dt_ast_reg_block_t reg_block )

Get the register base address of an instance.

Parameters
dtInstance of ast.
reg_blockThe register block requested.
Returns
The register base address of the requested block.

Definition at line 73 of file dt_ast.c.

◆ dt_ast_reset()

Get the reset signal connected to a reset port of an instance.

Parameters
dtInstance of ast.
rstReset port.
Returns
Reset signal.

Definition at line 90 of file dt_ast.c.