MCPcopy Create free account
hub / github.com/coreboot/coreboot / send_ec_command

Function send_ec_command

util/ectool/ec.c:34–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32#define debug(x...) if (verbose) printf(x)
33
34int send_ec_command(uint8_t command)
35{
36 int timeout;
37
38 timeout = 0x7ff;
39 while ((inb(ec_sc) & EC_IBF) && --timeout) {
40 usleep(10);
41 if ((timeout & 0xff) == 0)
42 debug(".");
43 }
44 if (!timeout) {
45 debug("Timeout while sending command 0x%02x to EC!\n",
46 command);
47 // return -1;
48 }
49
50 outb(command, ec_sc);
51 return 0;
52}
53
54int send_ec_data(uint8_t data)
55{

Callers 5

ec_readFunction · 0.70
ec_ext_readFunction · 0.70
ec_ext_writeFunction · 0.70
ec_writeFunction · 0.70
ec_queryFunction · 0.70

Calls 2

inbFunction · 0.70
outbFunction · 0.70

Tested by

no test coverage detected