// 实现对一个8bit数据(unsigned char 类型)的指定位(例如第n位)置0或者置1操作,并保持其他位不变
#include
void bit_set(unsigned char *p_data, unsigned char position, int flag)
{
unsigned c;
unsigned char a = 1;
a = a << (position ...
分类:
编程语言 时间:
2015-05-20 09:51:45
阅读次数:
178
/*请编写实现以下功能函数:实现对一个8bit数据(unsigned char)的指定位(例如第8位)的置0或置1操作,并保持其他位不变。
函数原型:void bit_set(unsigned char *p_date,unsigned char position,int flag)。
函数参数说明:p_date是指定数据源,position是指定位(1~8),flag是置0或置1。
*/...
分类:
编程语言 时间:
2015-04-20 00:37:35
阅读次数:
187
OTG_FS general core configuration register (OTG_FS_GCCFG)Bit 21 NOVBUSSENS: VBUS sensing disable optionWhen this bit is set, VBUS is considered intern...
分类:
其他好文 时间:
2015-03-13 09:14:40
阅读次数:
257
/** * fls - find last (most-significant) bit set * @x: the word to search * * This is defined the same way as ffs. * Note fls(0) = 0, fls(1) = 1, fls(...
分类:
系统相关 时间:
2014-12-18 16:30:56
阅读次数:
250