* caller should not assume or rely on any specific order.
*
* After the system has been scanned for devices, the list of detected (and
* caller should not assume or rely on any specific order.
*
* After the system has been scanned for devices, the list of detected (and
*
* TODO: Error checks?
* TODO: Option to only scan for specific devices or device classes.
*
* @return SR_OK upon success, SR_ERR upon errors.
*/
*
* TODO: Error checks?
* TODO: Option to only scan for specific devices or device classes.
*
* @return SR_OK upon success, SR_ERR upon errors.
*/
* Return the list of logic analyzer devices libsigrok has detected.
*
* If the libsigrok-internal device list is empty, a scan for attached
* Return the list of logic analyzer devices libsigrok has detected.
*
* If the libsigrok-internal device list is empty, a scan for attached
* additionally a pointer to the newly created device is also returned.
*
* The device has no probes attached to it yet after this call. You can
* additionally a pointer to the newly created device is also returned.
*
* The device has no probes attached to it yet after this call. You can
* The added probe is automatically enabled (the 'enabled' field is TRUE).
*
* The 'trigger' field of the added probe is set to NULL. A trigger can be
* The added probe is automatically enabled (the 'enabled' field is TRUE).
*
* The 'trigger' field of the added probe is set to NULL. A trigger can be
* or SR_ERR_ARG upon invalid arguments.
* If something other than SR_OK is returned, 'device' is unchanged.
*/
* or SR_ERR_ARG upon invalid arguments.
* If something other than SR_OK is returned, 'device' is unchanged.
*/
* @return A pointer to the requested probe's 'struct sr_probe', or NULL
* if the probe could not be found.
*/
* @return A pointer to the requested probe's 'struct sr_probe', or NULL
* if the probe could not be found.
*/
if (!p) {
sr_err("dev: %s: probe %d not found", __func__, probenum);
return SR_ERR; /* TODO: More specific error? */
if (!p) {
sr_err("dev: %s: probe %d not found", __func__, probenum);
return SR_ERR; /* TODO: More specific error? */
* @return SR_OK upon success, SR_ERR_ARG upon invalid arguments.
* If something other than SR_OK is returned, 'device' is unchanged.
*/
* @return SR_OK upon success, SR_ERR_ARG upon invalid arguments.
* If something other than SR_OK is returned, 'device' is unchanged.
*/
if (!p) {
sr_err("dev: %s: probe %d not found", __func__, probenum);
return SR_ERR; /* TODO: More specific error? */
if (!p) {
sr_err("dev: %s: probe %d not found", __func__, probenum);
return SR_ERR; /* TODO: More specific error? */