Software APIs
dif_sram_ctrl_autogen.h
Go to the documentation of this file.
1 // Copyright lowRISC contributors (OpenTitan project).
2 // Licensed under the Apache License, Version 2.0, see LICENSE for details.
3 // SPDX-License-Identifier: Apache-2.0
4 
5 #ifndef OPENTITAN_SW_DEVICE_LIB_DIF_AUTOGEN_DIF_SRAM_CTRL_AUTOGEN_H_
6 #define OPENTITAN_SW_DEVICE_LIB_DIF_AUTOGEN_DIF_SRAM_CTRL_AUTOGEN_H_
7 
8 // THIS FILE HAS BEEN GENERATED, DO NOT EDIT MANUALLY. COMMAND:
9 // util/make_new_dif.py --mode=regen --only=autogen
10 
11 /**
12  * @file
13  * @brief <a href="/book/hw/ip/sram_ctrl/">SRAM_CTRL</a> Device Interface
14  * Functions
15  */
16 
17 #include <stdbool.h>
18 #include <stdint.h>
19 
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif // __cplusplus
27 
28 /**
29  * A handle to sram_ctrl.
30  *
31  * This type should be treated as opaque by users.
32  */
33 typedef struct dif_sram_ctrl {
34  /**
35  * The base address for the sram_ctrl hardware registers.
36  */
39 
40 /**
41  * Creates a new handle for a(n) sram_ctrl peripheral.
42  *
43  * This function does not actuate the hardware.
44  *
45  * @param base_addr The MMIO base address of the sram_ctrl peripheral.
46  * @param[out] sram_ctrl Out param for the initialized handle.
47  * @return The result of the operation.
48  */
51  dif_sram_ctrl_t *sram_ctrl);
52 
53 /**
54  * A sram_ctrl alert type.
55  */
56 typedef enum dif_sram_ctrl_alert {
57  /**
58  * This fatal alert is triggered when a fatal TL-UL bus integrity fault is
59  * detected, or if the initialization mechanism has reached an invalid state.
60  */
63 
64 /**
65  * Forces a particular alert, causing it to be escalated as if the hardware
66  * had raised it.
67  *
68  * @param sram_ctrl A sram_ctrl handle.
69  * @param alert The alert to force.
70  * @return The result of the operation.
71  */
74  dif_sram_ctrl_alert_t alert);
75 
76 #ifdef __cplusplus
77 } // extern "C"
78 #endif // __cplusplus
79 
80 #endif // OPENTITAN_SW_DEVICE_LIB_DIF_AUTOGEN_DIF_SRAM_CTRL_AUTOGEN_H_