bu_bits.c

来自「基于EthernetIP协议的应用程序,可以读取AB公司Controllogix」· C语言 代码 · 共 95 行

C
95
字号
/****************************************************************************
*****************************************************************************
**
** File Name
** ---------
**
** BU_BITS.C
**
**
*****************************************************************************
*****************************************************************************
**
** Description
** -----------
**
** Bit Utilities Code Source File
**
** This source file contains two global scope tables that provide bit number
** to bit mask conversion services.
**
**
*****************************************************************************
*****************************************************************************
**
** Source Change Indices
** ---------------------
**
** Porting: <none>0----<major>         Customization: <none>0----<major>
**
*****************************************************************************
*****************************************************************************
**                                                                         **
** ETHERNET/IP EXAMPLE CODE                                                **
** COPYRIGHT (c) 2000-2005 ODVA (Open DeviceNet Vendor Association)		   **
**						   & ControlNet International Ltd.                 **
**                                                                         **
** All rights reserved, except as specifically licensed in writing.        **
** Use of the Ethernet/IP Example Protocol Software is subject to          **
** ODVA's and ControlNet International's Terms of Use Agreement.           **
** The following work constitutes example program code and is intended     **
** merely to illustrate useful programming techniques.  The user is        **
** responsible for applying the code correctly.  The code is provided      **
** AS IS without warranty and is in no way guaranteed to be error-free.    **
**                                                                         **
*****************************************************************************
*****************************************************************************
*/

/****************************************************************************
*****************************************************************************
**
** Change Log
** ----------
**
**
**
*****************************************************************************
*****************************************************************************
*/


#include "ab.h"         /* basic services API public interfaces            */
#include "bu.h"         /* bit utilities component public interfaces       */



/****************************************************************************
**
**    Public Data Storage
**
*****************************************************************************
*/

UINT16 const BU_aiBitTbl[ 16 ] =    { 0x0001, 0x0002, 0x0004, 0x0008,
                                      0x0010, 0x0020, 0x0040, 0x0080,
                                      0x0100, 0x0200, 0x0400, 0x0800,
                                      0x1000, 0x2000, 0x4000, 0x8000
                                    };


UINT16 const BU_aiNotBitTbl[ 16 ] = { 0xFFFE, 0xFFFD, 0xFFFB, 0xFFF7,
                                      0xFFEF, 0xFFDF, 0xFFBF, 0xFF7F,
                                      0xFEFF, 0xFDFF, 0xFBFF, 0xF7FF,
                                      0xEFFF, 0xDFFF, 0xBFFF, 0x7FFF
                                    };


/****************************************************************************
**
** End of BU_BITS.C
**
*****************************************************************************
*/

⌨️ 快捷键说明

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