atapidma.h

来自「AMLOGIC DPF source code」· C头文件 代码 · 共 43 行

H
43
字号
#ifndef ATAPIDMA_H
#define ATAPIDMA_H

#include "includes.h"
#include <extend/interrupt.h>
#include <ioapi.h>
#include <amsysdef.h>
#include <listop.h>
#include <Drivers/include/mpeg_reg.h>
#include <Drivers/include/isa_reg.h>

typedef void (*atapi_dma_callback_t)(void *arg);

typedef struct{
    unsigned entry0; 
    unsigned entry1;
}
atapi_dma_table_t;

typedef struct{
    atapi_dma_callback_t cb; 
    void *cb_arg;
}
atapi_dma_cb_t;

#define MAX_ATAPI_DMA_TABLE 128

int atapi_dma_init(void);
void atapi_dma_deinit(void);
int atapi_dma_add_work(
INT32U   src_addr,       // to/From data location in SDRAM
INT32U   endian,         // Endian setting: 0,1,2 or 3
INT32U   csel,           // Level on the Cable select pin during DMA
INT32U   wr,             // set to 1 if transfering TO the ATAPI device
INT32U   dmamode,        // Multi-DMA Mode: 0, 1, 2 or 3 (ignored for UDMA)
INT32U   type,           // Type: 0 = Standard DMA, 1 = Ultra DMA, 2 =PIO DMA (new feature)
INT32U   pio_address,    // PIO Address: 0,1,..,15.  Used for DMA to PIO address (new feature)
INT32U   byte_count,     // Number of bytes to transfer (must be divisible by 2)
atapi_dma_callback_t callback,
void *callback_arg
);

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?