Add comedi_get_read/write_subdevice()
This commit is contained in:
parent
3386926ddb
commit
b4fd07f2cf
2 changed files with 17 additions and 0 deletions
|
@ -185,6 +185,8 @@ enum comedi_oor_behavior {
|
|||
|
||||
enum comedi_oor_behavior comedi_set_global_oor_behavior(enum comedi_oor_behavior behavior);
|
||||
|
||||
int comedi_get_read_subdevice(comedi_t *dev);
|
||||
int comedi_get_write_subdevice(comedi_t *dev);
|
||||
|
||||
|
||||
|
||||
|
|
15
lib/get.c
15
lib/get.c
|
@ -96,6 +96,21 @@ int comedi_find_subdevice_by_type(comedi_t *it,int type,unsigned int subd)
|
|||
return -1;
|
||||
}
|
||||
|
||||
int comedi_get_read_subdevice(comedi_t *dev)
|
||||
{
|
||||
if(!valid_dev(dev))
|
||||
return -1;
|
||||
|
||||
return dev->devinfo.read_subdevice;
|
||||
}
|
||||
|
||||
int comedi_get_write_subdevice(comedi_t *dev)
|
||||
{
|
||||
if(!valid_dev(dev))
|
||||
return -1;
|
||||
|
||||
return dev->devinfo.write_subdevice;
|
||||
}
|
||||
|
||||
int comedi_get_n_channels(comedi_t *it,unsigned int subd)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue