Skip to content

Commit a9644e3

Browse files
committed
Add getters for Tx DC offset calibration to umtrx_lms.py.
1 parent 50b90d2 commit a9644e3

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

python_lib/umtrx_lms.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,11 @@ def lms_set_vga1dc_i_int(lms_dev, dc_shift_int):
370370
if not (0 <= dc_shift_int <= 255): return None
371371
return lms_dev.reg_write_bits(0x42, 0xff, dc_shift_int)
372372

373+
def lms_get_vga1dc_i_int(lms_dev):
374+
""" Get VGA1 DC offset, I channel
375+
Returns the offset value on success, None on error"""
376+
return lms_dev.reg_get_bits(0x42, 0xff, 0)
377+
373378
def lms_set_vga1dc_i(lms_dev, dc_shift):
374379
""" Set VGA1 DC offset, I channel
375380
dc_shift is an a DC shift in mV [-16 .. 15.9375]
@@ -385,6 +390,11 @@ def lms_set_vga1dc_q_int(lms_dev, dc_shift_int):
385390
if not (0 <= dc_shift_int <= 255): return None
386391
return lms_dev.reg_write_bits(0x43, 0xff, dc_shift_int)
387392

393+
def lms_get_vga1dc_q_int(lms_dev):
394+
""" Get VGA1 DC offset, Q channel
395+
Returns the offset value on success, None on error"""
396+
return lms_dev.reg_get_bits(0x43, 0xff, 0)
397+
388398
def lms_set_vga1dc_q(lms_dev, dc_shift):
389399
""" Set VGA1 DC offset, Q channel
390400
dc_shift is an a DC shift in mV [-16 .. 15.9375]

0 commit comments

Comments
 (0)