static u_int8_t ReadReg(iavc_softc_t *sc, u_int32_t reg) { u_int8_t cmd = 1; if (b1dma_tolink(sc, &cmd, 1) == 0 && b1dma_tolink(sc, ®, 4) == 0) { u_int32_t tmp; if (b1dma_fromlink(sc, &tmp, 4) == 0) return (u_int8_t) tmp; } return 0xff; }
static __u8 ReadReg(avmcard *card, __u32 reg) { __u8 cmd = 0x01; if ( b1dma_tolink(card, &cmd, 1) == 0 && b1dma_tolink(card, ®, 4) == 0) { __u32 tmp; if (b1dma_fromlink(card, &tmp, 4) == 0) return (__u8)tmp; } return 0xff; }