The open routines now return status, allowing the caller to
differentiate between I/O failures and an invalid device specifier.
This commit still contains some in-progress known bugs with
some (avoidable) invalid memory accesses.
Also included is the addition of a get_device_speed() to the
backend function table. Querying the device speed has been moved out
of the backend open() routines, and up to the top-level in bladerf.c.
Commiting to sync up for a dev sprint today. If you're pulling HEAD
to test out the latest and greatest, you'll likely want to avoid this
changest for the time being.
By returning the result, notably from end_fpga_programming(), we
wind up returning a non-zero return value where 0=success and <0=error
are expected.
However, I'm not sure we should be checking the result from the vendor
command response in these routines. Would it be a good idea to
ensure the FPGA is reset after issuing BLADE_USB_CMD_BEGIN_PROG?
There is a FPGA status poll loop afterwards, so I'm inclined to say
we can ignore the fpga status in the end programming command.