Motorola MC68340 Specifikace Strana 32

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 36
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 31
32
}
return result;
}
/**************************************************************************/
/**************************************************************************/
/* Module : Test16BitRegister() */
/* Parameters : NONE */
/* Return Type : char */
/* Created On : 05/04/95 */
/* Modified On : 05/24/95 */
/* Description : This routine tests 16 bit accesses to the fifos. It */
/* writes then reads the pattern stored in TestBit16[]. */
/**************************************************************************/
/**************************************************************************/
char Test16BitRegister()
{
unsigned char result;
unsigned short int StoredValue,Loop;
result = FALSE;
for (Loop=0;Loop<6;++Loop)
FIFO = TestBit16[Loop];
for (Loop=0;Loop<6;++Loop)
{
StoredValue = FIFO;
if (StoredValue != TestBit16[Loop])
{
DisplayErrorMessage(StoredValue,TestBit16[Loop]);
if(!(AskUser())) return ERROR;
result = ERROR;
}
}
return result;
}
/**************************************************************************/
/**************************************************************************/
/* Module : Test8Write16Read() */
/* Parameters : NONE */
/* Return Type : char */
/* Created On : 05/04/95 */
/* Modified On : 05/23/95 */
/* Description : This routine does 8 bit writes and 16 bit reads from the*/
/* fifos. This test makes sure that fifos are accessed */
/* properly. */
/**************************************************************************/
/**************************************************************************/
char Test8Write16Read()
{
unsigned short int StoredValue;
unsigned short int Loop,result;
result = FALSE;
for (Loop=0;Loop<6;++Loop)
{
FIFOA = TestBit8[Loop]; /*8 bit writes from TestBit8[] */
FIFOB = TestBit8[Loop+6];
}
for (Loop=0;Loop<6;++Loop)
{
StoredValue = FIFO; /*16 bit read from FIFO */
Zobrazit stránku 31
1 2 ... 27 28 29 30 31 32 33 34 35 36

Komentáře k této Příručce

Žádné komentáře