ewl.h

来自「freescale i.mx31 BSP CE5.0全部源码」· C头文件 代码 · 共 63 行

H
63
字号
/*------------------------------------------------------------------------------
--                                                                            --
--       This software is confidential and proprietary and may be used        --
--        only as expressly authorized by a licensing agreement from          --
--                                                                            --
--                            Hantro Products Oy.                             --
--                                                                            --
--      In the event of publication, the following notice is applicable:      --
--                                                                            --
--                   (C) COPYRIGHT 2003 HANTRO PRODUCTS OY                    --
--                            ALL RIGHTS RESERVED                             --
--                                                                            --
--          The entire notice above must be reproduced on all copies.         --
--                                                                            --
--------------------------------------------------------------------------------
--
--  Project  : 1200s
--
--  Abstract : Encoder wrapper layer
--
-------------------------------------------------------------------------------*/


#ifndef __EWL_H__
#define __EWL_H__

#include "basetype.h"

#undef PTRACE   /* undef it, just in case */
#if defined(TRACE_EWL)
#   define PTRACE(fmt, args...) printf(__FILE__ ":%d: " fmt, __LINE__ , ## args)
#elif defined(__GNUC__)
#   define PTRACE(fmt, args...) /* no trace */
#else
#   define PTRACE()
#endif

enum ewl_ret
{
    EWL_OK = 0,
    EWL_NOK = -1,
    EWL_TIMEOUT = 1
};

extern u32 EWL_ReadReg(u32 offset);
extern void EWL_WriteReg(u32 offset, u32 val);

extern i32 EWL_Init(void);
extern i32 EWL_Release(void);

extern u32 *EWL_MallocLinear(u32 size);
extern void EWL_FreeLinear(u32 * pVirt);
extern u32 EWL_Virt2Bus(u32 * pVirt);

extern i32 EWL_PostHwRdy(void);
extern i32 EWL_WaitHwRdy(void);
extern i32 EWL_ResetHwRdy(void);

extern void EWL_IRQ_Enable(void);
extern void EWL_IRQ_Disable(void);

#endif /*__EWL_H__*/

⌨️ 快捷键说明

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