www.beck-ipc.com

@CHIP-RTOS C Library V2.00 - Hardware API Structures


Dma_Info data structure

DMA Info data structure

typedef struct Dma_Info_
{

    unsigned count;

    union
    {
        void far *mem;
        unsigned int io;
    }
    src;

    union
    {
        void far *mem;
        unsigned int io;
    }
    dest;

    unsigned ctrl_reg;

} Dma_Info ;

Members

count

DMA counter (bytes which have to be transfered)

src

Data source

dest

Data destination

ctrl_reg

Control Register:
    Bit 0: 1=Priority for the channel / 0=Priority for the other channel
    Bit 1: 1=Source synchronized / 0=No source synchronization
    Bit 2: 1=Destination synchronized / 0=No destination synchronization
    Bit 3: 1=Use interrupt at end of transfer / 0=do not use an interrupt
    Bit 4: must be set to '1'
    Bit 5: 1=Source address increment / 0=No increment of source address
    Bit 6: 1=Source address decrement / 0=No decrement of source Address
    Bit 7: 1=Source is in memory space / 0=Source is in IO space
    Bit 8: 1=Destination address increment / 0=No increment of destination address
    Bit 9: 1=Destination address decrement / 0=No decrement of destination address
    Bit 10: 1=Destination is in memory space / 0=Destination is in IO space
    Bit 11: 1=Word Transfer / 0=Byte Transfer

Comments

The source and destination pointers are either far pointers to memory or a 16 bit I/O address.  If ctrl_reg bit 7 (DMA_SRCMEM ) is set then src is a far memory pointer, otherwise it is a 16 bit I/O address.  Likewise if ctrl_reg bit 10 (DMA_DESTMEM ) is set then dest is a far memory pointer, otherwise it is a 16 bit I/O address.

See Also


This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document