Initializing, extracting, and comparing device identifier information
(struct bladerf_devinfo) is now exposed through the API. Among other
things, this allow users to check if a device specifier string matches a
device they already have a handle for.
To support this, a copy of bladerf_devinfo information is now kept around in
the device handle; backends are responsible for populating this in their
open() implementation. A couple of the fields were already present, so
this only adds a couple small variables worth of overhead.
Some re-arranging of the linux and libusb probe and open calls has been done
to achieve this. A few warnings and bugs were addressed in this process:
- The Linux backend was attempting to fill in a serial number via
a cached entry.
- There was some potential for a read of an uninitialized portion
of an otp buffer.
- Missing serial # has been made non-fatal. (Some developers'
device do not have serial numbers.)
Files associated with this functionality was moved from host/common
back into the library, which should now be used instead. bladeRF-flash
has been updated to use these new API functions.