📄 xxx.h
字号:
//----------------------------------------------------------------------------
// Filename : xxx.h
//----------------------------------------------------------------------------
//
// Copyright (c) 2008,东莞太平计算机科技有限公司
// All rights reserved.
// www.pacific-gold.com.cn
//
// 历史版本:
//
// 版本: V1.0
// 作者: 罗先能
// 日期: 2007-12-21
// 描述: 建立第一版本
//
//
// 描述:
// 1. 设备xxx的驱动程序
//
//----------------------------------------------------------------------------
#ifndef __XXX_H__
#define __XXX_H__
//============================================================================
//----------------------------------------------------------------------------
// Includes
//----------------------------------------------------------------------------
#include "71x_lib.h"
//----------------------------------------------------------------------------
// Global Constant Definitions
//----------------------------------------------------------------------------
typedef enum
{
COMMAND1 = 1,
COMMAND2 = 4,
COMMAND3
} COMMAND_DEF;
//----------------------------------------------------------------------------
// Global Varable Declare
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// Global Function Declare
//----------------------------------------------------------------------------
/****************************************************************
* Function Name : xxx_init(...)
* Description : initialize the device of xxx
*
* Input : None
* Output : None
* Return : None
****************************************************************/
extern bool xxx_init( void ); // initailize the device
extern bool xxx_open( void ); // turn on the device
extern bool xxx_close( void ); // turn off the device
extern bool xxx_write(u32 address, u32 size, void* buffer); // write datas to the device
extern bool xxx_read( u32 address, u32* size void* buffer); // get datas from the device
extern bool xxx_ctrl( COMMAND_DEF cmd, u32 arg, void* buffer); // control the device
extern void xxx_isr(void); // the ISR (Interrupt Service Routine) for the device
//============================================================================
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -