📄 bittest.c
字号:
/* *---------------------------------------------------------------------- * T-Kernel / Standard Extension * * Copyright (C) 2006 by Ken Sakamura. All rights reserved. * T-Kernel / Standard Extension is distributed * under the T-License for T-Kernel / Standard Extension. *---------------------------------------------------------------------- * * Version: 1.00.00 * Released by T-Engine Forum(http://www.t-engine.org) at 2006/8/11. * *---------------------------------------------------------------------- *//* * bittest.c (common) */#include <bitop.h>#define TSD_BTT_SFT_3 3#define TSD_BTT_VAL_7 7#define TSD_BTT_MSK_7 7UEXPORT BOOL BitTest( VP base, UW offset ){#if BIGENDIAN return (BOOL)((((UB*)base)[offset >> TSD_BTT_SFT_3] >> (UW)(TSD_BTT_VAL_7 - (offset & TSD_BTT_MSK_7))) & 1U);#else return (BOOL)((((UB*)base)[offset >> TSD_BTT_SFT_3] >> (UW)(offset & TSD_BTT_MSK_7)) & 1U);#endif}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -