1
0
mirror of https://github.com/preble/libpinproc synced 2026-02-24 18:25:23 +01:00

Added support for PDB machine type.

This commit is contained in:
Gerry Stellenberg
2011-11-04 16:09:23 -05:00
parent b6a40477c0
commit 21c3a45e88
2 changed files with 4 additions and 3 deletions

View File

@@ -111,6 +111,7 @@ typedef enum PRMachineType {
kPRMachineWPC95 = 4, kPRMachineWPC95 = 4,
kPRMachineSternWhitestar = 5, kPRMachineSternWhitestar = 5,
kPRMachineSternSAM = 6, kPRMachineSternSAM = 6,
kPRMachinePDB = 7,
} PRMachineType; } PRMachineType;
// PRHandle Creation and Deletion // PRHandle Creation and Deletion

View File

@@ -68,7 +68,7 @@ PRDevice* PRDevice::Create(PRMachineType machineType)
PRMachineType readMachineType = dev->GetReadMachineType(); PRMachineType readMachineType = dev->GetReadMachineType();
// Custom is always accepted // 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. // Don't accept if requested type is WPC/WPC95 but read machine is not.
( (((machineType == kPRMachineWPC) || ( (((machineType == kPRMachineWPC) ||
@@ -107,7 +107,7 @@ PRResult PRDevice::Reset(uint32_t resetFlags)
num_collected_bytes = 0; num_collected_bytes = 0;
numPreparedWriteWords = 0; numPreparedWriteWords = 0;
if (machineType != kPRMachineCustom) DriverLoadMachineTypeDefaults(machineType, resetFlags); if (machineType != kPRMachineCustom && machineType != kPRMachinePDB) DriverLoadMachineTypeDefaults(machineType, resetFlags);
// Disable dmd events if updating the device. // Disable dmd events if updating the device.
#if 0 #if 0
@@ -296,7 +296,7 @@ if (0) {
DEBUG(PRLog(kPRLogInfo, "Updating driver #%d\n", driverState->driverNum)); 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); PRSetLastErrorText("Refusing to update driver #%d; polarity differs on non-custom machine.", driverState->driverNum);
return kPRFailure; return kPRFailure;