
Firmware
Code Examples
PPC/PMC-8260/DS1
4 - 35
Waiting for Command Completion
/* Wait for completion of current command
* Returns 0 on error, 1 on success
*/
int pmc8260_wait (
char *memBase /* PCI window address */
)
{
int seconds = 0;
printf (“waiting “);
while (1)
{
if (!strncmp (PBSYNC, “.OK.”, 4))
{
printf (“OK\n”);
return 1;
}
if (!strncmp (PBSYNC, “FAIL”, 4))
{
printf (“FAILURE\n”);
return 0;
}
if (strncmp (PBSYNC, “BUSY”, 4))
{
if (seconds > 2)
{
printf (“command acknowledge timeout\n”);
return 0;
}
}
printf (“.”);
sleep(1);
if (+ > 40)
{
printf (“Still BUSY after 40 seconds ...\n”);
return 0;
}
}
}
Summary of Contents for PPC/PMC-8260/DS1
Page 1: ...PPC PMC 8260 DS1 Reference Guide P N 6806800B10A July 2006 ...
Page 8: ...viii PPC PMC 8260 DS1 ...
Page 22: ...xxii PPC PMC 8260 DS1 ...
Page 26: ...xxvi PPC PMC 8260 DS1 ...
Page 30: ...xxx PPC PMC 8260 DS1 ...
Page 31: ...1 Introduction ...
Page 32: ......
Page 39: ...2 Installation ...
Page 40: ......
Page 53: ...3 Indicators and Connectors ...
Page 54: ......
Page 64: ...On Board Connectors Indicators and Connectors 3 12 PPC PMC 8260 DS1 ...
Page 65: ...4 Firmware ...
Page 66: ......
Page 104: ...Code Examples Firmware 4 40 PPC PMC 8260 DS1 ...
Page 105: ...5 Memory Map and Devices ...
Page 106: ......
Page 132: ...Resetting the Devices Memory Map and Devices 5 28 PPC PMC 8260 DS1 ...
Page 133: ...6 TDM Channel Configuration ...
Page 134: ......
Page 145: ...A Troubleshooting ...
Page 146: ......
Page 148: ...A 4 PPC PMC 8260 DS1 ...
Page 150: ...I 2 PPC PMC 8260 DS1 ...