-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathec-tool.h
41 lines (29 loc) · 1.2 KB
/
ec-tool.h
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
/*
* SPDX-License-Identifier: GPL-2.0
*
* Copyright (C) 2022 Nicole Faerber <nicole.faerber@puri.sm>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed "as is" WITHOUT ANY WARRANTY of any
* kind, whether expressed or implied; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License version 2 for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
int port_open(void);
int port_read(int fd, off_t offset, size_t len, void *buf);
int port_write(int fd, off_t offset, size_t len, void *buf);
int cmd_read(int fd);
int cmd_write(int fd, u_int8_t cmd);
int cmd_result(int fd);
int cmd_data_read(int fd, int len, void *buf);
int cmd_data_write(int fd, u_int8_t cmd, void *cmd_data, int len);
void spi_read(int fd);
int get_ec_board(int fd, void *buf);
int get_ec_version(int fd, void *buf);