Lines Matching refs:bit
24 static ALWAYS_INLINE void sys_set_bit(mem_addr_t addr, unsigned int bit) in sys_set_bit() argument
28 *(volatile uint32_t *)addr = temp | (1 << bit); in sys_set_bit()
31 static ALWAYS_INLINE void sys_clear_bit(mem_addr_t addr, unsigned int bit) in sys_clear_bit() argument
35 *(volatile uint32_t *)addr = temp & ~(1 << bit); in sys_clear_bit()
38 static ALWAYS_INLINE int sys_test_bit(mem_addr_t addr, unsigned int bit) in sys_test_bit() argument
42 return temp & (1 << bit); in sys_test_bit()
60 void sys_bitfield_set_bit(mem_addr_t addr, unsigned int bit) in sys_bitfield_set_bit() argument
65 sys_set_bit(addr + ((bit >> 5) << 2), bit & 0x1F); in sys_bitfield_set_bit()
69 void sys_bitfield_clear_bit(mem_addr_t addr, unsigned int bit) in sys_bitfield_clear_bit() argument
71 sys_clear_bit(addr + ((bit >> 5) << 2), bit & 0x1F); in sys_bitfield_clear_bit()
75 int sys_bitfield_test_bit(mem_addr_t addr, unsigned int bit) in sys_bitfield_test_bit() argument
77 return sys_test_bit(addr + ((bit >> 5) << 2), bit & 0x1F); in sys_bitfield_test_bit()
81 int sys_test_and_set_bit(mem_addr_t addr, unsigned int bit) in sys_test_and_set_bit() argument
85 ret = sys_test_bit(addr, bit); in sys_test_and_set_bit()
86 sys_set_bit(addr, bit); in sys_test_and_set_bit()
92 int sys_test_and_clear_bit(mem_addr_t addr, unsigned int bit) in sys_test_and_clear_bit() argument
96 ret = sys_test_bit(addr, bit); in sys_test_and_clear_bit()
97 sys_clear_bit(addr, bit); in sys_test_and_clear_bit()
103 int sys_bitfield_test_and_set_bit(mem_addr_t addr, unsigned int bit) in sys_bitfield_test_and_set_bit() argument
107 ret = sys_bitfield_test_bit(addr, bit); in sys_bitfield_test_and_set_bit()
108 sys_bitfield_set_bit(addr, bit); in sys_bitfield_test_and_set_bit()
114 int sys_bitfield_test_and_clear_bit(mem_addr_t addr, unsigned int bit) in sys_bitfield_test_and_clear_bit() argument
118 ret = sys_bitfield_test_bit(addr, bit); in sys_bitfield_test_and_clear_bit()
119 sys_bitfield_clear_bit(addr, bit); in sys_bitfield_test_and_clear_bit()