summaryrefslogtreecommitdiff
path: root/common/mock/mkbp_events_mock.c
blob: d42c06fdec4ebcdff6dde195fb7847a39a4ac7c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* Copyright 2019 The Chromium OS Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

/**
 * @file
 * @brief Mock event handling for MKBP keyboard protocol
 */

#include <stdint.h>

#include "common.h"
#include "mock/mkbp_events_mock.h"

#ifndef TEST_BUILD
#error "Mocks should only be in the test build."
#endif

struct mock_ctrl_mkbp_events mock_ctrl_mkbp_events =
	MOCK_CTRL_DEFAULT_MKBP_EVENTS;

int mkbp_send_event(uint8_t event_type)
{
	return mock_ctrl_mkbp_events.mkbp_send_event_return;
}