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

📄 bitroutines.h

📁 wcdma模型
💻 H
字号:
/* | | Copyright disclaimer: |   This software was developed at the National Institute of Standards |   and Technology by employees of the Federal Government in the course |   of their official duties. Pursuant to title 17 Section 105 of the |   United States Code this software is not subject to copyright |   protection and is in the public domain. | |   We would appreciate acknowledgement if the software is used. |*//* | Project:	WCDMA simulation environment | Module:      Bit manipulation routines | Author:      Tommi Makelainen, NIST | Date:        January 6, 1999 | | History: |              January 6, 1999 Tommi Makelainen |                      Initial version. | */#include <stdio.h>#include <math.h>/* -------------------------------------------------------------------- *//* * Function:	extract_bit_from_byte * Desc.:	Extract given single bit value from a given byte. * * Inputs: *   byte	input byte *   pos	bit position (7-0) 7 = leftmost, 0 = bit on the right * Returns: *              bit value (0 or 1) * * Note:	 */char extract_bit_from_byte(char byte, int pos);/* -------------------------------------------------------------------- *//* * Function:	set_bit_in_byte * Desc.:	Set a value of a single bit 'bit' in given *              position 'pos' in a byte 'byte'. * * Inputs: *   bit	input bit value *   pos	bit position to set * Outputs: *   byte	modified byte * * Note:	 */int set_bit_in_byte(char bit, int pos, char *byte);/* -------------------------------------------------------------------- */

⌨️ 快捷键说明

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