Software APIs
lc_ctrl_fi_commands.h
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_TESTS_PENETRATIONTESTS_JSON_LC_CTRL_FI_COMMANDS_H_
6 #define OPENTITAN_SW_DEVICE_TESTS_PENETRATIONTESTS_JSON_LC_CTRL_FI_COMMANDS_H_
7 #include "sw/device/lib/ujson/ujson_derive.h"
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 // clang-format off
13 
14 #define LCCTRLFI_SUBCOMMAND(_, value) \
15  value(_, Init) \
16  value(_, RuntimeCorruption)
17 UJSON_SERDE_ENUM(LcCtrlFiSubcommand, lc_ctrl_fi_subcommand_t, LCCTRLFI_SUBCOMMAND);
18 
19 #define LCCTRLFI_CORRUPTION(field, string) \
20  field(res, uint32_t) \
21  field(state, uint32_t) \
22  field(counter, uint32_t) \
23  field(alerts, uint32_t, 3) \
24  field(err_status, uint32_t) \
25  field(ast_alerts, uint32_t, 2)
26 UJSON_SERDE_STRUCT(LcCtrlFiCorruption, lc_ctrl_fi_corruption_t, LCCTRLFI_CORRUPTION);
27 
28 // clang-format on
29 
30 #ifdef __cplusplus
31 }
32 #endif
33 #endif // OPENTITAN_SW_DEVICE_TESTS_PENETRATIONTESTS_JSON_LC_CTRL_FI_COMMANDS_H_