diff --git a/include/pinproc.h b/include/pinproc.h index 0b54160..8bcbfd7 100644 --- a/include/pinproc.h +++ b/include/pinproc.h @@ -111,6 +111,7 @@ typedef enum PRMachineType { kPRMachineWPC95 = 4, kPRMachineSternWhitestar = 5, kPRMachineSternSAM = 6, + kPRMachinePDB = 7, } PRMachineType; // PRHandle Creation and Deletion diff --git a/src/PRDevice.cpp b/src/PRDevice.cpp index 5fa0252..8884c9b 100644 --- a/src/PRDevice.cpp +++ b/src/PRDevice.cpp @@ -68,7 +68,7 @@ PRDevice* PRDevice::Create(PRMachineType machineType) PRMachineType readMachineType = dev->GetReadMachineType(); // Custom is always accepted - if (machineType != kPRMachineCustom && + if (machineType != kPRMachineCustom && machineType != kPRMachinePDB && // Don't accept if requested type is WPC/WPC95 but read machine is not. ( (((machineType == kPRMachineWPC) || @@ -107,7 +107,7 @@ PRResult PRDevice::Reset(uint32_t resetFlags) num_collected_bytes = 0; numPreparedWriteWords = 0; - if (machineType != kPRMachineCustom) DriverLoadMachineTypeDefaults(machineType, resetFlags); + if (machineType != kPRMachineCustom && machineType != kPRMachinePDB) DriverLoadMachineTypeDefaults(machineType, resetFlags); // Disable dmd events if updating the device. #if 0 @@ -296,7 +296,7 @@ if (0) { DEBUG(PRLog(kPRLogInfo, "Updating driver #%d\n", driverState->driverNum)); - if (driverState->polarity != drivers[driverState->driverNum].polarity && machineType != kPRMachineCustom) + if (driverState->polarity != drivers[driverState->driverNum].polarity && machineType != kPRMachineCustom && machineType != kPRMachinePDB) { PRSetLastErrorText("Refusing to update driver #%d; polarity differs on non-custom machine.", driverState->driverNum); return kPRFailure;