Re: Problem with CALIBRATE and SEEK commands
Posted: Thu Dec 10, 2009 9:26 pm
Well I am testing with a USB-to-Floppy since my laptop has no floppy disk drive and my desktop's drive doesn't work. Also, when testing in VirtualBox to see if the motor turns on, nothing happens. I would be able to hear the motor right? Here's my motor controlling code:
Code: Select all
void fdc_motor(bool ed) {
// check if we need to turn on the motor
if(ed) {
uint8 mctl;
// figure out which motor we need to control
switch(drive) {
case 0:
mctl = FDC_DOR_MASK_MCTL_DR0;
break;
case 1:
mctl = FDC_DOR_MASK_MCTL_DR1;
break;
case 2:
mctl = FDC_DOR_MASK_MCTL_DR2;
break;
case 3:
mctl = FDC_DOR_MASK_MCTL_DR3;
}
// write the DOR to start the motor of the current drive
fdc_write_dor(mctl | FDC_DOR_MASK_ENABLE | FDC_DOR_MASK_DMA_MODE | drive);
}
else {
// write the DOR to stop the motor of the current drive
fdc_write_dor(FDC_DOR_MASK_ENABLE);
}
}