Specifications

34
/* the fifos. The values are read during a READ interrupt.*/
/**************************************************************************/
/**************************************************************************/
char InterruptWriteTest()
{
unsigned short int counter;
CMDR = RstFIFO;
puts(" Performing WRITE to FIFOs using interrupts");
for (counter = 0;counter<15;++counter)
FIFO = counter;
return FALSE;
}
/**************************************************************************/
/**************************************************************************/
/* Module : InterruptReadTest() */
/* Parameters : NONE */
/* Return Type : char */
/* Created On : 05/04/95 */
/* Modified On : 05/04/95 */
/* Description : This routine reads the values written by the interrupt */
/* write routine. Error messages are displayed if a */
/* mismatch occurs. */
/**************************************************************************/
/**************************************************************************/
char InterruptReadTest()
{
unsigned char result;
unsigned short int counter,StoredValue;
result = FALSE;
puts(" Performing READ to FIFOs using interrupts");
for (counter = 0;counter<15;++counter)
{
StoredValue = FIFO;
if (StoredValue != counter)
{
DisplayErrorMessage(StoredValue,counter);
if (!(AskUser())) return ERROR;
result = ERROR;
}
}
return result;
}
/**************************************************************************/
/**************************************************************************/
/* Module : DisplayErrorMessage() */
/* Parameters : unsigned short int,unsigned short int */
/* Return Type : void */
/* Created On : 05/04/95 */
/* Modified On : 05/04/95 */
/* Description : Displays error message along with right & wrong values */
/**************************************************************************/
/**************************************************************************/
void DisplayErrorMessage(unsigned short int WrongValue,unsigned short int RightValue)
{
puts("\nAn Error Occurred.");
PrintHex(RightValue);
puts(": Expected Value");
PrintHex(WrongValue);