From 2c7f83e006c3fee8d26e940eee801a4be9443e50 Mon Sep 17 00:00:00 2001 From: neoraider Date: Mon, 18 Apr 2005 15:18:02 +0000 Subject: Verzeichnisstruktur ver?ndert --- include/dma.h | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 include/dma.h (limited to 'include/dma.h') diff --git a/include/dma.h b/include/dma.h new file mode 100644 index 0000000..3c45f7a --- /dev/null +++ b/include/dma.h @@ -0,0 +1,47 @@ +#define PORT_DMA_BASE_ADDR0 0x00 +#define PORT_DMA_WORD_COUNT0 0x01 +#define PORT_DMA_BASE_ADDR1 0x02 +#define PORT_DMA_WORD_COUNT1 0x03 +#define PORT_DMA_BASE_ADDR2 0x04 +#define PORT_DMA_WORD_COUNT2 0x05 +#define PORT_DMA_BASE_ADDR3 0x06 +#define PORT_DMA_WORD_COUNT3 0x07 + +#define PORT_DMA_COMMAND 0x08 +#define PORT_DMA_WRITE_REQUEST 0x09 +#define PORT_DMA_MASK 0x0A +#define PORT_DMA_MODE 0x0B +#define PORT_DMA_FF 0x0C + +#define PORT_DMA_PAGE0 0x87 +#define PORT_DMA_PAGE1 0x83 +#define PORT_DMA_PAGE2 0x81 +#define PORT_DMA_PAGE3 0x82 + +#define DMA_MODE_DEMAND 0x00 +#define DMA_MODE_SINGLE 0x40 +#define DMA_MODE_BLOCK 0x80 +#define DMA_MODE_CASCADE 0xC0 + +#define DMA_MODE_VERIFY 0x00 +#define DMA_MODE_READ 0x04 +#define DMA_MODE_WRITE 0x08 + +#define DMA_MODE_INC_ADDR 0x00 +#define DMA_MODE_DEC_ADDR 0x20 + + +static unsigned char dma_page_ports[4] = { + PORT_DMA_PAGE0, + PORT_DMA_PAGE1, + PORT_DMA_PAGE2, + PORT_DMA_PAGE3 +}; + + +void dma_enable(unsigned char dma_nr); +void dma_disable(unsigned char dma_nr); +void dma_set_base_addr(unsigned char dma_nr, void *addr); +void dma_set_word_count(unsigned char dma_nr, unsigned short words); +void dma_set_mode(unsigned char dma_nr, unsigned char mode); +void dma_clear_ff(); -- cgit v1.2.3