#include <acess.h>
#include "common.h"
#include <dma.h>
+#include <timers.h>
// === CONSTANTS ===
#define MOTOR_ON_DELAY 500
// Clear the motor off timer
Time_RemoveTimer(gaFDD_Disks[Disk].Timer);
- gaFDD_Disks[Disk].Timer = -1;
+ gaFDD_Disks[Disk].Timer = NULL;
// Check if the motor is already on
if( gaFDD_Disks[Disk].MotorState == MOTOR_ATSPEED )
{
if( gaFDD_Disks[Disk].MotorState != MOTOR_ATSPEED )
return 0;
- if( gaFDD_Disks[Disk].Timer != -1 )
+ if( gaFDD_Disks[Disk].Timer != NULL )
return 0;
gaFDD_Disks[Disk].Timer = Time_CreateTimer(MOTOR_OFF_DELAY, FDD_int_StopMotorCallback, (void*)(tVAddr)Disk);
int _disk;
Uint16 base = FDD_int_GetBase(Disk, &_disk);
- gaFDD_Disks[Disk].Timer = -1;
+ gaFDD_Disks[Disk].Timer = NULL;
gaFDD_Disks[Disk].MotorState = MOTOR_OFF;
outb(base + FDC_DOR, inb(base+FDC_DOR) & ~(1 << (_disk + 4)));