예제 #1
0
파일: sbc.c 프로젝트: edgar-pek/PerspicuOS
static u_int
sb_get_byte(struct resource *io)
{
    	int i;

    	for (i = 1000; i > 0; i--) {
		if (sb_rd(io, DSP_DATA_AVAIL) & 0x80)
			return sb_rd(io, DSP_READ);
		else
			DELAY(20);
    	}
    	return 0xffff;
}
예제 #2
0
파일: sb16.c 프로젝트: kame/kame
static int
sb_dspwr(struct sb_info *sb, u_char val)
{
    int  i;

    for (i = 0; i < 1000; i++) {
        if ((sb_rd(sb, SBDSP_STATUS) & 0x80))
            DELAY((i > 100)? 1000 : 10);
        else {
            sb_wr(sb, SBDSP_CMD, val);
            return 1;
        }
    }
    printf("sb_dspwr(0x%02x) timed out.\n", val);
    return 0;
}
예제 #3
0
파일: sb8.c 프로젝트: AhmadTux/DragonFlyBSD
static int
sb_dspready(struct sb_info *sb)
{
	return ((sb_rd(sb, SBDSP_STATUS) & 0x80) == 0);
}
예제 #4
0
파일: sbc.c 프로젝트: edgar-pek/PerspicuOS
static int
sb_dspready(struct resource *io)
{
	return ((sb_rd(io, SBDSP_STATUS) & 0x80) == 0);
}