comedi_find_subdevice_by_type
Prev | 5.4.1. Core Functions | Next

## Name

comedi_find_subdevice_by_type — search for subdevice type

## Synopsis

    #include <comedilib.h>

`int comedi_find_subdevice_by_type(` | comedi_t * device,
| int type,
| unsigned int start_subdevice`)`;

## Description

The function `comedi_find_subdevice_by_type` tries to locate a subdevice belonging to comedi device `device`, having type `type`, starting with the subdevice `start_subdevice`. The comedi_subdevice_type enum specifies the possible subdevice types.

## Return value

If it finds a subdevice with the requested type, it returns its index. If there is an error, the function returns `-1` and sets the appropriate error.

Prev | Up | Next
comedi_find_range | Home | comedi_from_phys