Commit 5bc933b446bca0596c907c916cfdb97d6172c382
1 parent
46964b4b1e
Exists in
master
.
Showing 2 changed files with 0 additions and 36 deletions Side-by-side Diff
redpitaya/server/test.py
redpitaya/server/test_emb.py
| 1 | -#!/usr/bin/env python | |
| 2 | -import ctypes, argparse | |
| 3 | -import liboscimp_fpga | |
| 4 | - | |
| 5 | -def parse(): | |
| 6 | - parser = argparse.ArgumentParser(description = 'Set offsets to DAC1 and DAC2') | |
| 7 | - parser.add_argument('-of1', | |
| 8 | - action='store', | |
| 9 | - dest='of1', | |
| 10 | - default=0, | |
| 11 | - help='DAC1 offset (bits)') | |
| 12 | - parser.add_argument('-of2', | |
| 13 | - action='store', | |
| 14 | - dest='of2', | |
| 15 | - default=0, | |
| 16 | - help='DAC2 offset (bits)') | |
| 17 | - args = parser.parse_args() | |
| 18 | - return args | |
| 19 | - | |
| 20 | -def main(): | |
| 21 | - args = parse() | |
| 22 | - of1 = int(args.of1) | |
| 23 | - of2 = int(args.of2) | |
| 24 | - liboscimp_fpga.add_const_set_offset("/dev/add_const_0", of1) | |
| 25 | - liboscimp_fpga.add_const_set_offset("/dev/add_const_1", of2) | |
| 26 | - print('offset DAC1 : %i'%of1) | |
| 27 | - print('offset DAC2 : %i'%of2) | |
| 28 | - | |
| 29 | -if __name__ == "__main__": | |
| 30 | - main() |