I have been able to successfully follow the instructions at https://github.com/analogdevicesinc/meta-adi/tree/master/meta-adi-xilinx to add the meta-adi layers into my petalinux project using petalinux 2021.2.
I am now attempting to experiment with the C-interface APIs by following the example code at: github.com/.../ad9361-iiostream.c
I have noticed a couple things:
1) In ad9361-iiostream.c, it #includes <iio/iio.h>. For me, iio.h is showing up in /usr/include of my sysroots, not in an "iio" folder under there.
2) In ad9361-iiostream.c, it #includes <iio/iio-debug.h>. My sysroots does not contain a "iio-debug.h".
3) On lines 228 and 231 of ad9361-iiostream.c, it is invoking an API "iio_create_context". This API does not exist in my iio.h. Instead I have "iio_create_local_context" which doesn't take any parameters, and a couple others, but not this specific one that this example code is using.
4) On line 249 of ad9361-iiostream.c, it is invoking an API "iio_create_channels_mask". This API does not exist in my iio.h. There isn't anything about "masks" in my iio.h. Searching google, it appears this API was in a file named mask.c, but in my sysroots, I do not have a mask.h header file that would correspond with that in the /usr/include of my sysroots.
Based on these questions, it kind of appears that maybe the ad9361-iiostream.c example is based upon an older (or maybe newer) version of IIO than what was built into my petalinux project via the meta-adi layer. Can anyone explain this?
Thanks,
Kent