mirror of
https://github.com/preble/libpinproc
synced 2026-02-24 18:25:23 +01:00
cleanup: move "\n" from start to end of printf() output
This commit is contained in:
committed by
Gerry Stellenberg
parent
d415ac8614
commit
bb14a68037
@@ -116,9 +116,9 @@ void display(PRHandle proc, char * string_1, char * string_2)
|
||||
segs_a = asciiSegments[char_a - 32];
|
||||
segs_b = asciiSegments[char_b - 32];
|
||||
|
||||
printf("\nASCII Chars and associated segment values: %d", i);
|
||||
printf("\nchar_a: %x, segs_a: %x", char_a, segs_a);
|
||||
printf("\nchar_b: %x, segs_b: %x", char_b, segs_b);
|
||||
printf("ASCII Chars and associated segment values: %d\n", i);
|
||||
printf("char_a: %x, segs_a: %x\n", char_a, segs_a);
|
||||
printf("char_b: %x, segs_b: %x\n", char_b, segs_b);
|
||||
|
||||
PRDriverAuxPrepareOutput(&(auxCommands[cmd_index++]), segs_a & 0xff, 0, STB_1, false, 0);
|
||||
PRDriverAuxPrepareOutput(&(auxCommands[cmd_index++]), (segs_a >> 8) & 0xff, 0, STB_2, false, 0);
|
||||
@@ -137,9 +137,11 @@ void display(PRHandle proc, char * string_1, char * string_2)
|
||||
|
||||
PRDriverAuxPrepareJump(&auxCommands[cmd_index++],1);
|
||||
|
||||
printf("\nAux commands being sent:");
|
||||
printf("Aux commands being sent:\n");
|
||||
for (i=0; i<cmd_index; i++) {
|
||||
printf("\nCommand: %d\tdata: %8x\tenables: %4d\tdelay_time: %10d\tjumpAddr: %4d",auxCommands[i].command, auxCommands[i].data, auxCommands[i].enables, auxCommands[i].delayTime, auxCommands[i].jumpAddr);
|
||||
printf("Command: %d\tdata: %8x\tenables: %4d\tdelay_time: %10d\tjumpAddr: %4d\n",
|
||||
auxCommands[i].command, auxCommands[i].data, auxCommands[i].enables,
|
||||
auxCommands[i].delayTime, auxCommands[i].jumpAddr);
|
||||
}
|
||||
|
||||
// Send the commands.
|
||||
@@ -150,9 +152,11 @@ void display(PRHandle proc, char * string_1, char * string_2)
|
||||
PRDriverAuxPrepareJump(&auxCommands[cmd_index++],1);
|
||||
PRDriverAuxSendCommands(proc, auxCommands, cmd_index, 0);
|
||||
|
||||
printf("\nAux commands being sent:");
|
||||
printf("Aux commands being sent:\n");
|
||||
for (i=0; i<cmd_index; i++) {
|
||||
printf("\nCommand: %d\tdata: %x\tenables: %d\tdelay_time: %d\tjumpAddr: %d",auxCommands[i].command, auxCommands[i].data, auxCommands[i].enables, auxCommands[i].delayTime, auxCommands[i].jumpAddr);
|
||||
printf("Command: %d\tdata: %x\tenables: %d\tdelay_time: %d\tjumpAddr: %d\n",
|
||||
auxCommands[i].command, auxCommands[i].data, auxCommands[i].enables,
|
||||
auxCommands[i].delayTime, auxCommands[i].jumpAddr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ int PRDevice::GetEvents(PREvent *events, int maxEvents)
|
||||
}
|
||||
|
||||
|
||||
//fprintf(stderr, "\nLibpinproc: event type: %d", type);
|
||||
//fprintf(stderr, "Libpinproc: event type: %d\n", type);
|
||||
switch (type)
|
||||
{
|
||||
case P_ROC_EVENT_TYPE_SWITCH:
|
||||
@@ -216,7 +216,7 @@ int PRDevice::GetEvents(PREvent *events, int maxEvents)
|
||||
|
||||
case P_ROC_EVENT_TYPE_BURST_SWITCH:
|
||||
{
|
||||
//fprintf(stderr, "\nBurst event");
|
||||
//fprintf(stderr, "Burst event\n");
|
||||
if (open) events[i].type = kPREventTypeBurstSwitchOpen;
|
||||
else events[i].type = kPREventTypeBurstSwitchClosed;
|
||||
break;
|
||||
@@ -443,7 +443,8 @@ PRResult PRDevice::DriverLoadMachineTypeDefaults(PRMachineType machineType, uint
|
||||
memset(driver, 0x00, sizeof(PRDriverState));
|
||||
driver->driverNum = i;
|
||||
driver->polarity = mappedDriverGroupPolarity[i/8];
|
||||
DEBUG(PRLog(kPRLogInfo,"\nDriver Polarity for Driver: %d is %x.", i,driver->polarity));
|
||||
DEBUG(PRLog(kPRLogInfo, "Driver Polarity for Driver: %d is %x.\n",
|
||||
i, driver->polarity));
|
||||
if (resetFlags & kPRResetFlagUpdateDevice)
|
||||
res = DriverUpdateState(driver);
|
||||
}
|
||||
@@ -474,7 +475,8 @@ PRResult PRDevice::DriverLoadMachineTypeDefaults(PRMachineType machineType, uint
|
||||
|
||||
if (resetFlags & kPRResetFlagUpdateDevice) {
|
||||
res = DriverUpdateGroupConfig(&group);
|
||||
DEBUG(PRLog(kPRLogInfo,"\nDriver Polarity for Group: %d is %x.", i,group.polarity));
|
||||
DEBUG(PRLog(kPRLogInfo, "Driver Polarity for Group: %d is %x.\n",
|
||||
i, group.polarity));
|
||||
}
|
||||
else
|
||||
driverGroups[i] = group;
|
||||
@@ -495,7 +497,8 @@ PRResult PRDevice::DriverLoadMachineTypeDefaults(PRMachineType machineType, uint
|
||||
|
||||
if (resetFlags & kPRResetFlagUpdateDevice) {
|
||||
res = DriverUpdateGroupConfig(&group);
|
||||
DEBUG(PRLog(kPRLogInfo,"\nDriver Polarity for Group: %d is %x.", i,group.polarity));
|
||||
DEBUG(PRLog(kPRLogInfo,"Driver Polarity for Group: %d is %x.\n",
|
||||
i, group.polarity));
|
||||
}
|
||||
else
|
||||
driverGroups[i] = group;
|
||||
@@ -516,7 +519,8 @@ PRResult PRDevice::DriverLoadMachineTypeDefaults(PRMachineType machineType, uint
|
||||
|
||||
if (resetFlags & kPRResetFlagUpdateDevice) {
|
||||
res = DriverUpdateGroupConfig(&group);
|
||||
DEBUG(PRLog(kPRLogInfo,"\nDriver Polarity for Group: %d is %x.\n", i,group.polarity));
|
||||
DEBUG(PRLog(kPRLogInfo, "Driver Polarity for Group: %d is %x.\n",
|
||||
i, group.polarity));
|
||||
}
|
||||
else
|
||||
driverGroups[i] = group;
|
||||
|
||||
@@ -2037,7 +2037,7 @@ int verifyP3ROCImage(void)
|
||||
}
|
||||
}
|
||||
|
||||
//fprintf(stderr, "\nWriting Page: %x", pageAddr);
|
||||
//fprintf(stderr, "Writing Page: 0x%x\n", pageAddr);
|
||||
P3ROC_SPIReadPage(pageAddr, &readBuffer[0]);
|
||||
|
||||
if (memcmp(readBuffer, dataBuffer, sizeof readBuffer) != 0) {
|
||||
@@ -2086,12 +2086,12 @@ void writeP3ROCImage(void)
|
||||
}
|
||||
}
|
||||
|
||||
//fprintf(stderr, "\nWriting Page: %x", pageAddr);
|
||||
//fprintf(stderr, "Writing Page: 0x%x\n", pageAddr);
|
||||
P3ROC_SPIWritePage(pageAddr, &dataBuffer[0]);
|
||||
|
||||
//for (int i=0; i<64; i++)
|
||||
//{
|
||||
// fprintf(stderr, "\nPage: %x, Byte: %x:%x", pageAddr, i*4, dataBuffer[i]);
|
||||
// fprintf(stderr, "Page: %x, Byte: %x:%x\n", pageAddr, i*4, dataBuffer[i]);
|
||||
//}
|
||||
|
||||
pageAddr++;
|
||||
|
||||
Reference in New Issue
Block a user