blob: 01413c2dad9c5f927b99d5eb7caa9f5dabce102d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
void smbus_read_byte(void)
{
unsigned char host_status_register;
unsigned char byte;
int result;
host_status_register = __builtin_inb(0x1234);
/* read results of transaction */
byte = __builtin_inb(0x4567);
result = byte;
if (host_status_register != 0x02) {
result = -1;
}
}
|