summaryrefslogtreecommitdiff
path: root/common/mock_i8042.c
blob: a8c1a01447a7158bab174508cb3e1dbe554014d1 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* Copyright (c) 2012 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.
 *
 * Mock EC i8042 interface code.
 */

#include "i8042.h"
#include "timer.h"
#include "uart.h"

void i8042_receive(int data, int is_cmd)
{
	/* Not implemented */
	return;
}

void i8042_command_task(void)
{
	/* Do nothing */
	while (1)
		usleep(5000000);
}

enum ec_error_list i8042_send_to_host(int len, const uint8_t *bytes)
{
	int i;
	uart_printf("i8042 SEND:");
	for (i = 0; i < len; ++i)
		uart_printf(" %02x", bytes[i]);
	uart_printf("\n");
	return EC_SUCCESS;
}

void i8042_enable_keyboard_irq(int enable)
{
	/* Not implemented */
	return;
}

void i8042_flush_buffer()
{
	/* Not implemented */
	return;
}