pulse modulation added
This commit is contained in:
@@ -294,13 +294,17 @@ class Protocol:
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def encode_ad9102_wave_begin(sample_count: int) -> bytes:
|
||||
"""Build an AD9102 custom-wave upload BEGIN packet."""
|
||||
def encode_ad9102_wave_begin(sample_count: int, pat_period_us: int = 0) -> bytes:
|
||||
"""Build an AD9102 custom-wave upload BEGIN packet.
|
||||
|
||||
``pat_period_us`` is the pattern repetition period in microseconds;
|
||||
0 keeps the legacy back-to-back playback.
|
||||
"""
|
||||
return Protocol._encode_short_control(
|
||||
CMD_AD9102_WAVE_CONTROL,
|
||||
AD9102_WAVE_OPCODE_BEGIN,
|
||||
_ensure_uint(sample_count, "sample_count", 0, 0xFFFF),
|
||||
0,
|
||||
_ensure_uint(pat_period_us, "pat_period_us", 0, 0xFFFF),
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user