示例#1
0
static void floppy_on(unsigned int nr)
{
    unsigned char mask = 0x10 << nr;

    del_timer(motor_off_timer + nr);
    if (mask & running)
        floppy_select(nr);
    if (!(mask & current_DOR)) {
        del_timer(motor_on_timer + nr);
        motor_on_timer[nr].expires = HZ;
        add_timer(motor_on_timer + nr);
    }
    current_DOR &= 0xFC;
    current_DOR |= mask;
    current_DOR |= nr;
    outb(current_DOR,FD_DOR);
}
示例#2
0
static void motor_on_callback(unsigned long nr) {
	running |= 0x10 << nr;
	floppy_select(nr);
}