Software APIs
mock_alert.cc
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 "sw/device/silicon_creator/lib/drivers/mock_alert.h"
6 
7 namespace rom_test {
8 extern "C" {
9 rom_error_t alert_configure(size_t index, alert_class_t cls,
10  alert_enable_t enabled) {
11  return MockAlert::Instance().alert_configure(index, cls, enabled);
12 }
13 
14 rom_error_t alert_local_configure(size_t index, alert_class_t cls,
15  alert_enable_t enabled) {
16  return MockAlert::Instance().alert_local_configure(index, cls, enabled);
17 }
18 
19 rom_error_t alert_class_configure(alert_class_t cls,
20  const alert_class_config_t *config) {
21  return MockAlert::Instance().alert_class_configure(cls, config);
22 }
23 
24 rom_error_t alert_ping_enable(void) {
25  return MockAlert::Instance().alert_ping_enable();
26 }
27 } // extern "C"
28 } // namespace rom_test