Commit d274e2d5 authored by Lucas Russo's avatar Lucas Russo

sm_io/modules/acq/*: fix number of post-samples alignement

If the number of post-trigger samples is 0, do
not try to align it to anything (it's already aligned).
parent 1a2132bf
......@@ -163,7 +163,8 @@ static int _acq_data_acquire (void *owner, void *args, void *ret)
DDR3_PAYLOAD_SIZE/acq->acq_buf[chan].sample_size;
uint32_t num_samples_pre_aligned = num_samples_pre + samples_alignment -
(num_samples_pre % samples_alignment);
uint32_t num_samples_post_aligned = num_samples_post + samples_alignment -
uint32_t num_samples_post_aligned = (num_samples_post==0) ? 0 :
num_samples_post + samples_alignment -
(num_samples_post % samples_alignment);
/* Set the parameters: number of samples of this channel */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment