Skip to content

Commit

Permalink
Add param_set to dma_rx test
Browse files Browse the repository at this point in the history
Signed-off-by: Trecia Agoylo <[email protected]>
  • Loading branch information
tagoylo committed Feb 12, 2024
1 parent a240ae4 commit 1f35729
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/dma_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


def dma_rx(
uri, classname, channel, use_rx2=False, buffer_size=2 ** 15, annotated=False
uri, classname, channel, use_rx2=False, buffer_size=2 ** 15, annotated=False, param_set=None
):
"""dma_rx: Construct RX buffers and verify data is non-zero when pulled.
Collected buffer is of size 2**15 and 10 buffers are checked
Expand All @@ -36,8 +36,15 @@ def dma_rx(
Size of RX buffer in samples. Defaults to 2**15
annotated: type=bool
If True, annotated output is provided (dict)
param_set: type=dict
Dictionary of attribute and values to be set before tone is
received
"""
sdr = eval(classname + "(uri='" + uri + "')")
# Set custom device parameters
if param_set:
for p in param_set.keys():
setattr(sdr, p, param_set[p])
N = buffer_size

if use_rx2:
Expand Down

0 comments on commit 1f35729

Please sign in to comment.