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

Better backend API #1138

Merged
merged 10 commits into from
Mar 11, 2024
Merged

Better backend API #1138

merged 10 commits into from
Mar 11, 2024

Commits on Jan 31, 2024

  1. attr: Sort attributes after adding new ones

    Sort attributes as soon as a new one has been added.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Jan 31, 2024
    Configuration menu
    Copy the full SHA
    9a0d738 View commit details
    Browse the repository at this point in the history
  2. Rename private function iio_context_add_device()

    A backend API function iio_context_add_device() will be introduced;
    rename the old function so that it won't get in the way.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Jan 31, 2024
    Configuration menu
    Copy the full SHA
    b7c3a30 View commit details
    Browse the repository at this point in the history
  3. iio-backend: Add iio_context_add_device()

    This API function can be used to create and add a iio_device to the
    iio_context.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Jan 31, 2024
    Configuration menu
    Copy the full SHA
    57418cd View commit details
    Browse the repository at this point in the history
  4. iio-backend: Add function iio_device_add_channel()

    This API function can be used to create and add a iio_channel to the
    iio_device.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Jan 31, 2024
    Configuration menu
    Copy the full SHA
    4df43d6 View commit details
    Browse the repository at this point in the history
  5. iio-backend: Add functions iio_{context,device,channel}_add_attr()

    These functions can be used to add an attribute to an iio_context,
    iio_device and iio_channel respectively.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Jan 31, 2024
    Configuration menu
    Copy the full SHA
    153ac7b View commit details
    Browse the repository at this point in the history
  6. iio-backend: Update and export iio_context_create_from_backend()

    Change its prototype so that it takes a iio_context_params pointer, as
    well as major/minor/git_tag version information.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Jan 31, 2024
    Configuration menu
    Copy the full SHA
    4693025 View commit details
    Browse the repository at this point in the history
  7. xml: Decouple from private API and use new backend functions

    Use the new backend functions to create the iio_context, iio_device and
    iio_channel objects. By doing so, the XML backend is now fully decoupled
    from the private API, and it only uses public headers.
    
    Note that we don't need to print the channel or device names with the
    debug macros, as they already do that for us.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Jan 31, 2024
    Configuration menu
    Copy the full SHA
    0e15608 View commit details
    Browse the repository at this point in the history
  8. local: Use the new iio_context_add_device()

    Rework the code to use the new iio_context_add_device() from the backend
    API, instead of using Libiio's internal functions directly.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Jan 31, 2024
    Configuration menu
    Copy the full SHA
    5e60d5c View commit details
    Browse the repository at this point in the history
  9. context: Drop old function _iio_context_add_device()

    This function is not used anywhere anymore.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Jan 31, 2024
    Configuration menu
    Copy the full SHA
    bdb2f3d View commit details
    Browse the repository at this point in the history
  10. serial: Fix misleading error message

    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Jan 31, 2024
    Configuration menu
    Copy the full SHA
    6ad613a View commit details
    Browse the repository at this point in the history