Software APIs
lc_ctrl_volatile_raw_unlock_test.c
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 #include <assert.h>
6 #include <stdbool.h>
7 
13 #include "sw/device/lib/testing/lc_ctrl_testutils.h"
14 #include "sw/device/lib/testing/test_framework/check.h"
16 
18 
19 static dif_lc_ctrl_t lc_ctrl;
20 
21 OTTF_DEFINE_TEST_CONFIG();
22 
23 bool test_main(void) {
24  CHECK_DIF_OK(dif_lc_ctrl_init(
26 
27  dif_lc_ctrl_state_t state;
28  CHECK_DIF_OK(dif_lc_ctrl_get_state(&lc_ctrl, &state));
29  CHECK(state == kDifLcCtrlStateTestUnlocked0);
30  return true;
31 }