crt_data.c
来自「澳洲人写的Cortex,包括uC_IP协议栈」· C语言 代码 · 共 79 行
C
79 行
<HTML><HEAD><TITLE>/home/asysweb/public_html/cortex/kernel/src/crt_data.c</TITLE></HEAD><BODY><pre><font color="#6920ac">/*************************************************************************/</font><font color="#6920ac">/* */</font><font color="#6920ac">/* Copyright (c) 1997-1999 Australian Real Time Embedded Systems */</font><font color="#6920ac">/* */</font><font color="#6920ac">/* PROPRIETARY RIGHTS of Australian Real Time Embedded Systems */</font><font color="#6920ac">/* are involved in the subject matter of this material. All reproduction,*/</font><font color="#6920ac">/* manufacturing, use, and sales rights pertaining to this subject matter*/</font><font color="#6920ac">/* are governed by the license agreement. The recipient of this software */</font><font color="#6920ac">/* implicitly accepts the terms of the license. */</font><font color="#6920ac">/* */</font><font color="#6920ac">/*************************************************************************/</font><font color="#6920ac">/************************************************************************* * * FILE NAME * * crt_data.c * * SYSTEM COMPONENT * * System wide data * * DESCRIPTION * * * SCCS HISTORY * * @(#)crt_data.c 1.5, 01/25/99, 00:32:04 * * AUTHOR * * Vadim N. Azarovsky * * CREATED * * 10-Apr-1998 by Vadim N. Azarovsky * * REVISION HISTORY * * NAME DATE REMARKS * **************************************************************************/</font><b><font color='DarkGreen'>#include</font></b> <a href="crt_defs.h.FIND-INC"><font color="blue">"crt_defs.h"</font></a><font color="#6920ac">/* lookup table to calculate number of the most significant bit which is set */</font><i>crtx_Byte_t</i> crtx_MSB_g[256] = { 0xff, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, <font color="#6920ac">/* 0000-XXXX */</font> 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, <font color="#6920ac">/* 0001-XXXX */</font> 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, <font color="#6920ac">/* 0010-XXXX */</font> 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, <font color="#6920ac">/* 0011-XXXX */</font> 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, <font color="#6920ac">/* 0100-XXXX */</font> 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, <font color="#6920ac">/* 0101-XXXX */</font> 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, <font color="#6920ac">/* 0110-XXXX */</font> 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, <font color="#6920ac">/* 0111-XXXX */</font> 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, <font color="#6920ac">/* 1000-XXXX */</font> 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, <font color="#6920ac">/* 1001-XXXX */</font> 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, <font color="#6920ac">/* 1010-XXXX */</font> 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, <font color="#6920ac">/* 1011-XXXX */</font> 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, <font color="#6920ac">/* 1100-XXXX */</font> 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, <font color="#6920ac">/* 1101-XXXX */</font> 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, <font color="#6920ac">/* 1110-XXXX */</font> 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 <font color="#6920ac">/* 1111-XXXX */</font>};<font color="#6920ac">/* Lookup table to convert byte's bit number into bit mask */</font><i>crtx_Byte_t</i> crtx_NumToMask[8] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80};</pre></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?