Specifications

22
HARDWARE.H
/**************************************************************************/
/* File Name : HARDWARE.H */
/* File Type : C header file */
/* Created On : 05/04/95 */
/* Modified On: 05/23/95 */
/* Created By : Faisal Habib */
/* Description: This header file contains macros and function prototypes */
/* for the source program. The source program will test the */
/* hardware interface for the TNT and MC68340. In particular*/
/* it will test the three different types of I/O: Programmed,*/
/* Interrupts, and DMA. */
/**************************************************************************/
#ifndef __HARDWARE_H
#define __HARDWARE_H
#define WRITE 0
#define READ 1
#define IARB 0x0008
#define IRQ3 0x08
#define AVECIRQ3 0x0000006C
#define EnableMC68340Interrupts asm(" ori.w #$0200,SR"," andi.w #$FAFF,SR")
#define DMA_READ 0x1AA2
#define DMA_WRITE 0x06A2
#define DMA_CONF 0x177A
#define DMA_INTR 0x000F
#define DMA_SPACE 0xDD
#define DMA_DONE 0x40
#define DMA_BES 0x20
#define DMA_BED 0x10
#define DMA_CON 0x08
#define StartDMA CCR1 |= 0x01
void ConfigureMC();
char Programmed_IO_Test();
char Interrupt_IO_Test();
char DMA_IO_Test();
char SetupDMA(unsigned char,unsigned int,unsigned short int*);
unsigned short int Check_DMA_Status(unsigned char);
char Compare(unsigned short int*,unsigned short int*);
char Select();
#endif