summaryrefslogtreecommitdiff
path: root/zephyr/shim/include/zephyr_mkbp_event.h
blob: 0221be81d4c38c54b896df61ec1e73af3956b3f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* Copyright 2021 The ChromiumOS Authors
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#if !defined(__CROS_EC_MKBP_EVENT_H) || defined(__CROS_EC_ZEPHYR_MKBP_EVENT_H)
#error "This file must only be included from mkbp_event.h. " \
	"Include mkbp_event.h directly"
#endif
#define __CROS_EC_ZEPHYR_MKBP_EVENT_H

const struct mkbp_event_source *
zephyr_find_mkbp_event_source(uint8_t event_type);

/**
 * See include/mkbp_event.h for documentation.
 */
#define DECLARE_EVENT_SOURCE(_type, _func)                             \
	static const STRUCT_SECTION_ITERABLE(mkbp_event_source,        \
					     _cros_evtsrc_##_func) = { \
		.event_type = _type,                                   \
		.get_data = _func,                                     \
	}