MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / srd_inst_find_by_id

Function srd_inst_find_by_id

libsigrokdecode4DSL/instance.c:628–645  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

626 * @since 0.3.0
627 */
628SRD_API struct srd_decoder_inst *srd_inst_find_by_id(struct srd_session *sess,
629 const char *inst_id)
630{
631 GSList *l;
632 struct srd_decoder_inst *tmp, *di;
633
634 if (!sess)
635 return NULL;
636
637 di = NULL;
638 for (l = sess->di_list; l; l = l->next) {
639 tmp = l->data;
640 if ((di = srd_inst_find_by_id_stack(inst_id, tmp)) != NULL)
641 break;
642 }
643
644 return di;
645}
646
647/**
648 * Set the list of initial (assumed) pin values.

Callers 1

srd_inst_newFunction · 0.85

Calls 1

Tested by

no test coverage detected