Software APIs
dif_rom_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_ROM_CTRL_AUTOGEN_H_
6 #define OPENTITAN_SW_DEVICE_LIB_DIF_AUTOGEN_DIF_ROM_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/rom_ctrl/">ROM_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 rom_ctrl.
30  *
31  * This type should be treated as opaque by users.
32  */
33 typedef struct dif_rom_ctrl {
34  /**
35  * The base address for the rom_ctrl hardware registers.
36  */
39 
40 /**
41  * Creates a new handle for a(n) rom_ctrl peripheral.
42  *
43  * This function does not actuate the hardware.
44  *
45  * @param base_addr The MMIO base address of the rom_ctrl peripheral.
46  * @param[out] rom_ctrl Out param for the initialized handle.
47  * @return The result of the operation.
48  */
51  dif_rom_ctrl_t *rom_ctrl);
52 
53 /**
54  * A rom_ctrl alert type.
55  */
56 typedef enum dif_rom_ctrl_alert {
57  /**
58  * A fatal error. Fatal alerts are non-recoverable and will be asserted until
59  * a hard reset.
60  */
63 
64 /**
65  * Forces a particular alert, causing it to be escalated as if the hardware
66  * had raised it.
67  *
68  * @param rom_ctrl A rom_ctrl handle.
69  * @param alert The alert to force.
70  * @return The result of the operation.
71  */
74  dif_rom_ctrl_alert_t alert);
75 
76 #ifdef __cplusplus
77 } // extern "C"
78 #endif // __cplusplus
79 
80 #endif // OPENTITAN_SW_DEVICE_LIB_DIF_AUTOGEN_DIF_ROM_CTRL_AUTOGEN_H_