/* STAT is 0x379 and SDA_IN is 6 */ static int read_sda(void) { return (inb(STAT) >> SDA_IN) & 1; }