MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / reg_set_one_bit

Function reg_set_one_bit

bsp/loongson/ls1cdev/libraries/ls1c_public.c:18–28  ·  view source on GitHub ↗

* ��ָ���Ĵ�����ָ��λ��1 * @reg �Ĵ�����ַ * @bit ��Ҫ��1����һbit */

Source from the content-addressed store, hash-verified

16 * @bit ��Ҫ��1����һbit
17 */
18void reg_set_one_bit(volatile unsigned int *reg, unsigned int bit)
19{
20 unsigned int temp, mask;
21
22 mask = 1 << bit;
23 temp = *reg;
24 temp |= mask;
25 *reg = temp;
26
27 return ;
28}
29
30
31/*

Callers 5

gpio_initFunction · 0.70
gpio_setFunction · 0.70
pin_set_purposeFunction · 0.70
pin_set_remapFunction · 0.70
touch_int_cmdFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected