mirror of
https://git.rtems.org/rtems-tools/
synced 2025-10-16 21:42:55 +08:00
Add helper func.
- tests a bit at specified position.
This commit is contained in:

committed by
Chris Johns

parent
a7176a8a7e
commit
a4d0739522
@@ -16,3 +16,6 @@ def type_from_value(val):
|
||||
type = type.target ()
|
||||
# Get the unqualified type
|
||||
return type.unqualified ()
|
||||
|
||||
def test_bit(val, pos):
|
||||
return bool(val & (1 << (pos-1)))
|
Reference in New Issue
Block a user