Web lists-archives.com

Re: where is usb.h?




On Wed, Apr 5, 2017 at 2:39 AM, Dominique Dumont <dod@xxxxxxxxxx> wrote:
> On Tuesday, 4 April 2017 17:00:28 CEST songbird wrote:
>> Can't locate object method "nNumInterfaces" via package
>>
>> > "Device::USB::DevConfig" at ./read_usb.pl line 26, <DATA> line 1.
>
> Looks like a typo in Device::USB::DevConfig synopsis: nNumInterfaces is referenced only there.
>
> On the other hand bNumInterfaces is documented later in the man page and used in the test files:
>
> $ ack bNumInterfaces
> t/15-usb_dev_configuration.t
> 32:        qw/wTotalLength bNumInterfaces interfaces bConfigurationValue
> 48:        is( $cfg->bNumInterfaces(), scalar @{$cfg->interfaces()}, "$filename:$cfgno: interface count" );
>
> USB.pm
> 918:    hashStoreInt( hash, "bNumInterfaces", cfg->bNumInterfaces );
> 924:        list_interfaces( cfg->interface, cfg->bNumInterfaces )
>
> lib/Device/USB/DevConfig.pm
> 79:=item bNumInterfaces
> 123:_make_descr_accessor( 'bNumInterfaces' );
>
> lib/Device/USB.pm
> 918:    hashStoreInt( hash, "bNumInterfaces", cfg->bNumInterfaces );
> 924:        list_interfaces( cfg->interface, cfg->bNumInterfaces )
>
> Please log a bug upstream [1] for this issue
>
> All the best
>
> [1] https://rt.cpan.org/Dist/Display.html?Name=Device-USB

Yeah, it looks as if that module was never really more than proof of
concept and suggests a road map
   device --> hidapi --> scripting glue (e.g. Perl XS) --> HTTP server

Mark