⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hwapi_a2a.h

📁 瑞星微公司RK27XX系列芯片的SDK开发包
💻 H
字号:
/*********************************************************************************
*     Copyright (C),2004-2005,  Fuzhou Rockchip Co.,Ltd.
*         All Rights Reserved
*          V1.00
* FileName :  hw_a2a.h
* Author :  lzy
* Description:   a2a dma controller
* History  :
*   <author>  <time>    <version>    <desc>
*    lzy        07/8/18        1.0     ORG
$Log: hwapi_a2a.h,v $
Revision 1.3  2007/10/15 09:00:11  Huangxinyu
根据RK27提交修改driver

Revision 1.2  2007/10/08 02:38:37  Lingzhaojun
添加版本自动注释脚本


*********************************************************************************/
#ifndef _HWAPI_A2A_H
#define _HWAPI_A2A_H


//


#define A2AMode_IntEn                  (0x01<<12)
#define A2AMode_A1toA2               (0x01<<11)
//  burst mode
#define A2AMode_BurstSignle  (0x00<<9)
#define A2AMode_Burst4   (0x01<<9)
#define A2AMode_Burst8   (0x02<<9)
#define A2AMode_Burst16         (0x03<<9)
//  request mode

#define A2AMode_ReqNo                 (0x01<<7)
#define A2AMode_ReqSD         (0x00<<7)

// source address mode
#define A2AMode_SourceInc  (0x00<<6)
#define A2AMode_SourceFix  (0x01<<6)
// destination address mode
#define A2AMode_DestInc   (0x00<<5)
#define A2AMode_DestFix   (0x01<<5)
//  data width
#define A2AMode_width8Bit  (0x00<<1)           // A2A dma is no support byte transmit when address is fixed
#define A2AMode_width16Bit  (0x01<<1)
#define A2AMode_width32Bit  (0x02<<1)
//   transimt mode
#define A2AMode_Soft    (0x01<<0)
#define A2AMode_Hard   (0x00<<0)

typedef enum A2AError
{
    A2ASuccess = 0,
    A2AErr = -1,
    A2ABusy = -100
}A2AError_t;

typedef void (*A2ACallBack)(void);    /*A2ADMA 回调函数*/

typedef enum
{
    A2A_chn0 = 0,
    A2A_chn1 = 1,
    A2A_chnmax
}A2A_Channel_t;


int A2A_Transmit(UINT32 SrcAddr, UINT32 DestinAddr, UINT32 Count, UINT32 Mode, A2ACallBack CallBack);
int A2A_GetStatus(A2A_Channel_t channel);
void A2A_PowerOnInit(void);
void A2A_DeInit(void);


#define A2A_MemByteCopy    (A2AMode_ReqNo\
                                                |A2AMode_IntEn\
                                                |A2AMode_Burst16\
                                                |A2AMode_SourceInc\
                                                |A2AMode_DestInc \
                                                |A2AMode_width8Bit\
                                                |A2AMode_Soft)

#define A2A_MemIntCopy    (A2AMode_ReqNo\
                                                |A2AMode_IntEn\
                                                |A2AMode_Burst16\
                                                |A2AMode_SourceInc\
                                                |A2AMode_DestInc \
                                                |A2AMode_width32Bit\
                                                |A2AMode_Soft)

#define A2A_TestCopy    (A2AMode_ReqNo\
                                                |A2AMode_IntEn\
                                                |A2AMode_Burst8\
                                                |A2AMode_SourceInc\
                                                |A2AMode_DestInc\
                                                |A2AMode_width32Bit\
                                                |A2AMode_Soft)

#endif

⌨️ 快捷键说明

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