ncloader  0.1
 모두 데이타 구조 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 매크로 그룹들 페이지들
dma.c 파일 참조
#include <sys/types.h>
#include <stdio.h>
#include <stddef.h>
#include <port.h>
#include <dma.h>
#include <interrupt.h>
#include <list.h>
+ dma.c에 대한 include 의존 그래프

매크로

#define DMA_DISABLE(ch)
 Disable selected DMA channel (ch) 더 자세히 ...
 
#define DMA_ENABLE(ch)
 Enable selected DMA channel (ch) 더 자세히 ...
 
#define DMA_RESET_PTR(ch)
 Reset type pointer of DMAC. 더 자세히 ...
 
#define DMA_SET_PAGE(ch, addr)
 Address(32 Bits) can be devided into a page(64KB unit) and its offset. Update the buffer information to trnasfer data via the DMA. 더 자세히 ...
 
#define DMA_SET_ADDRESS(ch, addr)
 
#define DMA_SET_MODE(ch, mode)
 Update DMA mode, ch >> 2 ==> 0 : 8 Bits, 1 : 16 Bits. 더 자세히 ...
 
#define DMA_SET_TX_SIZE(ch, cnt)
 

of bytes to be transfered

더 자세히 ...
 
#define DMA_CTRL_FROM_CH(ch)   (((ch) >> 2) ? DMA_16BIT : DMA_8BIT)
 

함수

struct dma_ctrl_port_entry_tdma_get_ctrl_port (int type)
 type 에 해당하는 DMA 제어 포트 정보를 가져온다. 더 자세히 ...
 
struct dma_port_entry_tdma_get_port (int channel)
 channel 에 해당하는 port 를 가져온다. 더 자세히 ...
 
void dma_init (int ch, int mode, unsigned long address, int count)
 DMA Controller 를 초기화 한다. 더 자세히 ...
 
int dma_is_done (int ch)
 DMA 가 종료 되었는지 확인한다. 더 자세히 ...
 

매크로 문서화

#define DMA_CTRL_FROM_CH (   ch)    (((ch) >> 2) ? DMA_16BIT : DMA_8BIT)
#define DMA_DISABLE (   ch)
값:
do { \
outb(dma_ctrl[(ch)>>2].single_mask, DMA_MASK_DISABLE_CH|(ch)); \
} while (0)

Disable selected DMA channel (ch)

#define DMA_ENABLE (   ch)
값:
do { \
outb(dma_ctrl[(ch)>>2].single_mask, (ch)); \
} while (0)

Enable selected DMA channel (ch)

#define DMA_RESET_PTR (   ch)
값:
do { \
outb(dma_ctrl[(ch) >> 2].byte_ptr, 0x00); \
} while (0)

Reset type pointer of DMAC.

#define DMA_SET_ADDRESS (   ch,
  addr 
)
값:
do { \
outb(dma_port[ch].address, ((addr) & 0x000000FF)); \
outb(dma_port[ch].address, ((addr) & 0x0000FF00) >> 8); \
} while (0)
#define DMA_SET_MODE (   ch,
  mode 
)
값:
do { \
outb(dma_ctrl[(ch)>>2].write_mode, (mode) | (ch)); \
} while (0)

Update DMA mode, ch >> 2 ==> 0 : 8 Bits, 1 : 16 Bits.

#define DMA_SET_PAGE (   ch,
  addr 
)
값:
do { \
outb(dma_port[ch].page, (((addr) & 0x00FF0000) >> 16)); \
} while (0)

Address(32 Bits) can be devided into a page(64KB unit) and its offset. Update the buffer information to trnasfer data via the DMA.

#define DMA_SET_TX_SIZE (   ch,
  cnt 
)
값:
do { \
outb(dma_port[ch].count, ((unsigned short)(cnt) & 0x00FF)); \
outb(dma_port[ch].count, ((unsigned short)(cnt) & 0xFF00) >> 8); \
} while (0)

of bytes to be transfered