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

📄 dlccmd.h

📁 在ARM7和UC/OSII的平台上实现了GPS自动报站的功能,涉及GPS模块LEA_4S的驱动,位置速寻算法,语音芯片ISD4004的录放音驱动,LED页面管理等等.从启动代码到操作系统的移植以及到业
💻 H
字号:
/****************************************************************
**                                                              *
**  FILE         :  DLCCmd.H                                    *
**  COPYRIGHT    :  (c) 2001 .Xiamen Yaxon NetWork CO.LTD       *
**                                                              *
**                                                              *
**  By : CCH 2002.11.26                                         *
****************************************************************/
#ifndef DEF_DLCCMD
#define DEF_DLCCMD


/*
********************************************************************************
*                  DEFINE CONFIG PARAMETERS
********************************************************************************
*/
#define SIZE_DLCCMD                         20

#define DLC_OVERFLOW                        (20 * 3)        /* DLC_OVERFLOW = 3 seconds */
#define DLC_RESEND                          5


/*
********************************************************************************
*                  DEFINE CONTROL TYPE
********************************************************************************
*/
#define TYPE_SABM                           0x3F            /* set asynchronous balanced mode */
#define TYPE_UA                             0x73            /* unnumbered acknowledgement */
#define TYPE_DM                             0x0F            /* disconnected mode */
#define TYPE_DISC                           0x53            /* disconnect */
#define TYPE_UIH                            0xEF            /* unnumbered information with header check */
#define TYPE_UIH_RESPOND                    0xFF            /* unnumbered information with header check */
#define TYPE_UI                             0x03            /* unnumbered information */

#define TYPE_MSC                            0xE0            /* Modem Status Command */


/*
********************************************************************************
*                  DEFINE DLCCMD_STRUCT
********************************************************************************
*/
typedef struct {
    BOOLEAN needresend;                 /* command attrib */
    INT8U   dlci;                       /* dlci */
    INT8U   ctltype;                    /* control type */
    INT8U   cmdtype;                    /* command type */
    INT8U   len;                        /* command length */
    INT8U   ct_overflow;                /* overflow count */
    INT8U   ct_send;                    /* send count */
    INT8U   buffer[SIZE_DLCCMD];        /* command buffer */
    void (* informer)(INT8U dlci, INT8U reason);
} DLCCMD_STRUCT;


void FreeDLCCmd(DLCCMD_STRUCT *ptr);
DLCCMD_STRUCT *AllocDLCCmd(void);
DLCCMD_STRUCT *AllocDLCCmd_SABM(INT8U dlci, void (*informer)(INT8U, INT8U));
DLCCMD_STRUCT *AllocDLCCmd_DISC(INT8U dlci, void (*informer)(INT8U, INT8U));
DLCCMD_STRUCT *AllocDLCCmd_MSC(INT8U dlci, INT8U signal, BOOLEAN response);
void InitDLCCmd(void);
void ResetDLCCmd(void);

#endif

⌨️ 快捷键说明

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