X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=usrp%2Fhost%2Fapps%2Fdump_12bit_shorts;fp=usrp%2Fhost%2Fapps%2Fdump_12bit_shorts;h=a896f2dd3f406921c6f17885c8a951868d10adad;hb=8a9ddbb0675f9bfcc6e03b457fba6c79474a3693;hp=0000000000000000000000000000000000000000;hpb=82d471b9b4a8b389b5da44b19c69c36420828382;p=debian%2Fgnuradio diff --git a/usrp/host/apps/dump_12bit_shorts b/usrp/host/apps/dump_12bit_shorts new file mode 100755 index 00000000..a896f2dd --- /dev/null +++ b/usrp/host/apps/dump_12bit_shorts @@ -0,0 +1,23 @@ +#!/usr/bin/env python +# -*- Python -*- + +import sys, errno + +counter = 0 + +try: + while 1: + x = sys.stdin.read (2) + if not x: + break + + v = (ord(x[1]) << 8) | ord(x[0]) + sys.stdout.write ("0x%08x %6d 0x%04x\n" % (counter, v & 0x0fff, v)) + counter += 1 +except IOError, e: + if e.errno == errno.EPIPE: + sys.exit (0) + + + +