diff options
Diffstat (limited to 'include/mkbp_event.h')
-rw-r--r-- | include/mkbp_event.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/mkbp_event.h b/include/mkbp_event.h index 8173242497..d31bd82cb2 100644 --- a/include/mkbp_event.h +++ b/include/mkbp_event.h @@ -1,4 +1,4 @@ -/* Copyright 2014 The Chromium OS Authors. All rights reserved. +/* Copyright 2014 The ChromiumOS Authors * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. * @@ -57,4 +57,16 @@ struct mkbp_event_source { __attribute__((section(".rodata.evtsrcs"))) = { type, func } #endif +#ifdef TEST_BUILD +/* Allow directly raising events in unit tests */ +void activate_mkbp_with_events(uint32_t events_to_add); + +/** + * @brief Force the event bits to zero, causing the event handling code to + * believe there are no pending events to service. This has no effect on + * any event sources' internal queues or logic. + */ +__test_only void mkbp_event_clear_all(void); +#endif /* TEST_BUILD */ + #endif /* __CROS_EC_MKBP_EVENT_H */ |