diff options
Diffstat (limited to 'gnuradio-runtime/python/gnuradio/gru/hexint.py')
-rw-r--r-- | gnuradio-runtime/python/gnuradio/gru/hexint.py | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/gnuradio-runtime/python/gnuradio/gru/hexint.py b/gnuradio-runtime/python/gnuradio/gru/hexint.py deleted file mode 100644 index ad568b59a6..0000000000 --- a/gnuradio-runtime/python/gnuradio/gru/hexint.py +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright 2005 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# SPDX-License-Identifier: GPL-3.0-or-later -# -# - -def hexint(mask): - """ - Convert unsigned masks into signed ints. - - This allows us to use hex constants like 0xf0f0f0f2 when talking to - our hardware and not get screwed by them getting treated as python - longs. - """ - if mask >= 2**31: - return int(mask-2**32) - return mask - -def hexshort(mask): - """ - Convert unsigned masks into signed shorts. - - This allows us to use hex constants like 0x8000 when talking to - our hardware and not get screwed by them getting treated as python - longs. - """ - if mask >= 2**15: - return int(mask-2**16) - return mask |