Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cyclic mode to IIOD v0.x #1099

Merged
merged 4 commits into from
Dec 15, 2023
Merged

Fix cyclic mode to IIOD v0.x #1099

merged 4 commits into from
Dec 15, 2023

Commits on Dec 14, 2023

  1. utils/iio-common: Use CLOCK_MONOTONIC clock for timeouts

    The CLOCK_REALTIME clock may jump in time, which can be a huge problem
    when computing timeouts. Use the CLOCK_MONOTONIC one instead, which does
    not have this problem.
    
    Signed-off-by: Paul Cercueil <paul@crapouillou.net>
    pcercuei committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    3af7299 View commit details
    Browse the repository at this point in the history
  2. iiod: Fix segmentation fault when buffer creation failed

    When the buffer creation failed, entry->buf was left to whatever error
    pointer it had previously, instead of being reset to NULL; cleanup code
    would subsequently try to destroy the buffer once again with an invalid
    pointer.
    
    Signed-off-by: Paul Cercueil <paul@crapouillou.net>
    pcercuei committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    2819ff3 View commit details
    Browse the repository at this point in the history
  3. Add "cyclic" parameter to .buffer_enable() backend callback

    IIOD v0.x supports enqueueing cyclic blocks, but it needs to know about
    it when the iio_buffer is opened through the "OPEN" command. As
    iiod-client calls this command when the buffer is to be enabled, pass an
    extra "cyclic" parameter to .buffer_enable(), always set to "false" for
    now.
    
    Signed-off-by: Paul Cercueil <paul@crapouillou.net>
    pcercuei committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    9466de6 View commit details
    Browse the repository at this point in the history
  4. Rework cyclic block enqueue when talking to v0.x IIOD

    Instead of continuously sending the same block again and again, set the
    "cyclic" parameter of the .enable_buffer() backend callback to the value
    of the "cyclic" parameter of the last call to iio_buffer_enqueue().
    
    Signed-off-by: Paul Cercueil <paul@crapouillou.net>
    pcercuei committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    b8f3ea0 View commit details
    Browse the repository at this point in the history