Device Tables (DT) API for top earlgrey.
Definition in file api.c.
Get the instance ID for a given alert ID.
For example, on earlgrey, the instance ID of kTopEarlgreyAlertIdUart0FatalFault is kDtInstanceIdUart0. One can then use the type specific function to retrieve the alert name, for example dt_uart_alert_from_alert_id for the UART.
- Parameters
-
- Returns
- The instance ID, or
kDtInstanceIdUnknown if the alert ID is not valid.
Definition at line 291 of file api.c.
| dt_pinmux_direct_pad_t dt_pad_dio_pad_index |
( |
dt_pad_t | pad | ) |
|
Return the direct pad number of a DIO pad.
This is the index of the various DIO_PAD_* registers that control this pad.
- Parameters
-
| pad | A pad of type kDtPadTypeDio. |
- Returns
- The direct pad number of the DID that this pad is connected to.
Note: This function only makes sense for pads of type kDtPeriphIoTypeDio which are either outputs or inouts. For any other pad type, the return value is unspecified.
Definition at line 726 of file api.c.
| dt_pinmux_insel_t dt_pad_mio_insel |
( |
dt_pad_t | pad | ) |
|
Return the insel for an MIO pad.
This is the value to put in the MIO_PERIPH_INSEL registers to connect a peripheral I/O to this pad.
- Parameters
-
| pad | A pad of type kDtPadTypeMio. |
- Returns
- The insel of the MIO that this pad is connected to.
Note: This function only makes sense for pads of type kDtPadTypeMio. For any other pad, the return value is unspecified.
Definition at line 722 of file api.c.
| dt_pinmux_mio_out_t dt_pad_mio_out |
( |
dt_pad_t | pad | ) |
|
Return the pad out number for an MIO pad.
This is the index of the MIO_OUT registers that control this pad (or the output part of this pad).
- Parameters
-
| pad | A pad of type kDtPadTypeMio. |
- Returns
- The pad out number of the MIO.
Note: This function only makes sense for pads of type kDtPadTypeMio which are either inputs or inouts. For any other pad, the return value is unspecified.
Definition at line 713 of file api.c.
| dt_pinmux_muxed_pad_t dt_pad_mio_pad_index |
( |
dt_pad_t | pad | ) |
|
Return the pad out number for an MIO pad.
This is the index of the MIO_PAD registers that control this pad (or the output part of this pad).
- Parameters
-
| pad | A pad of type kDtPadTypeMio. |
- Returns
- The pad out number of the MIO.
Note: This function only makes sense for pads of type kDtPadTypeMio. For any other pad, the return value is unspecified.
Definition at line 717 of file api.c.
Get the instance ID for a given PLIC IRQ ID.
For example, on earlgrey, the instance ID of kTopEarlgreyPlicIrqIdUart0TxWatermark is kDtInstanceIdUart0. One can then use the type specific function to retrieve the IRQ name, for example dt_uart_irq_from_plic_id for the UART.
- Parameters
-
- Returns
- The instance ID, or
kDtInstanceIdUnknown if the PLIC ID is not valid.
Definition at line 211 of file api.c.