SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

 
 

perl-USB-Descriptor rpm build for : OpenSuSE. For other distributions click perl-USB-Descriptor.

Name : perl-USB-Descriptor
Version : 4 Vendor : obs://build_opensuse_org/devel:languages:perl
Release : lp155.1.1 Date : 2023-07-20 15:53:10
Group : Development/Libraries/Perl Source RPM : perl-USB-Descriptor-4-lp155.1.1.src.rpm
Size : 0.12 MB
Packager : https://www_suse_com/
Summary : USB Device Descriptor generation tools
Description :
the USB::Descriptor manpage provides a means of specifying a device\'s USB
descriptors and then generating descriptor structures suitable for use in
the device\'s firmware. However, the USB::Descriptor manpage only generates
the bytes that comprise the structures, it does not handle generation of
valid source code.

Any strings used in the descriptor set are automatically assigned indexes
and collected into a set of string descriptors by the top level the
USB::Descriptor::Device manpage object.

The easiest way to create a new descriptor set is to use the the
USB::Descriptor::device() manpage factory method. It accepts a hash of
arguments that happens to be the same hash expected by the
USB::Descriptor::Device manpage and returns a reference to a new the
USB::Descriptor::Device manpage object.

use USB::Descriptor;

my $device = USB::Descriptor::device(
\'usb_version\' => \'2.0.0\', # Default
\'max_packet_size\' => 64, # Full speed device
\'vendorID\' => 0x1234,
\'productID\' => 0x5678,
\'manufacturer\' => \'Acme, Inc.\',
\'product\' => \'Giant Catapult\',
\'serial_number\' => \'007\',
\'configurations\' => [{
\'description\' => \'Configuration 0\',
\'remote_wakeup\' => 1,
\'max_current\' => 100, # mA
\'interfaces\' => [{
\'description\' => \'Interface 0\',
\'endpoints\' => [{
\'direction\' => \'in\',
\'number\' => 1,
\'max_packet_size\' => 42,
}],
}],
},
);

The code above generates a the USB::Descriptor::Device manpage object as
well as a the USB::Descriptor::Configuration manpage, a the
USB::Descriptor::Interface manpage and a single the
USB::Descriptor::Endpoint manpage. Each descriptor object is configured
using the provided arguments and added to the descriptor tree.

Values for the device descriptor structure can be obtained by calling
\'$device->bytes\', or by using arrayification ( \'AATT{$device}\' ).

my AATTbytes = $device->bytes

or

my AATTbytes = AATT{$device};

A simple script can then be written to emit the device descriptor structure
in whatever language is appropriate to the device\'s project. For example,
to store the descriptor as an array of bytes for a *C* language project...

print \"uint8_t device_descriptor[] = {\", join(\', \', AATTbytes), \"};\
\";

Calling \'bytes\' on a the USB::Descriptor::Configuration manpage object, or
arrayifying it, produces a similar result. However, the configuration
object returns more than a configuration descriptor worth of values. It
returns the concatenated set of configuration, interface and endpoint
descriptors that is requested by a USB host during device enumeration.
Generating suitable *C* source might be accomplished with:

my AATTconfigurations = AATT{$device->configurations};
foreach my $configuration ( AATTconfigurations )
{
print \'uint8_t configuration[] = {\',
join(\', \', AATT{$configuration->bytes} ), \"}\
\";
}

When calling \'bytes\', or arrayifying a the USB::Descriptor::Device manpage,
all of the child objects are queried for their strings. The resulting
strings are automatically assigned string indexes and assembled into a
string descriptor set. The set of assembled strings can be retrieved as an
array, in index order, by calling \'$device->strings\'. The first string in
the array is the string that should be returned by the device in response
to a request for string ID 1.

my AATTstrings = $device->strings

Suitable language-specific code can then be generated from the resulting
array of strings.

RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-U/15.5/noarch

Content of RPM  Provides Requires

Download
ftp.icm.edu.pl  perl-USB-Descriptor-4-lp155.1.1.noarch.rpm
     

Provides :
perl(USB::Descriptor)
perl(USB::Descriptor::Configuration)
perl(USB::Descriptor::Device)
perl(USB::Descriptor::Endpoint)
perl(USB::Descriptor::Interface)
perl(USB::HID)
perl(USB::HID::Descriptor::Class)
perl(USB::HID::Descriptor::Interface)
perl(USB::HID::Descriptor::Report)
perl(USB::HID::Report)
perl(USB::HID::Report::Field)
perl-USB-Descriptor

Requires :
perl(:MODULE_COMPAT_5.26.1)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1


Content of RPM :
/usr/lib/perl5/vendor_perl/5.26.1/USB
/usr/lib/perl5/vendor_perl/5.26.1/USB/Descriptor
/usr/lib/perl5/vendor_perl/5.26.1/USB/Descriptor.pm
/usr/lib/perl5/vendor_perl/5.26.1/USB/Descriptor/Configuration.pm
/usr/lib/perl5/vendor_perl/5.26.1/USB/Descriptor/Device.pm
/usr/lib/perl5/vendor_perl/5.26.1/USB/Descriptor/Endpoint.pm
/usr/lib/perl5/vendor_perl/5.26.1/USB/Descriptor/Interface.pm
/usr/lib/perl5/vendor_perl/5.26.1/USB/HID
/usr/lib/perl5/vendor_perl/5.26.1/USB/HID.pm
/usr/lib/perl5/vendor_perl/5.26.1/USB/HID/Descriptor
/usr/lib/perl5/vendor_perl/5.26.1/USB/HID/Descriptor/Class.pm
/usr/lib/perl5/vendor_perl/5.26.1/USB/HID/Descriptor/Interface.pm
/usr/lib/perl5/vendor_perl/5.26.1/USB/HID/Descriptor/Report.pm
/usr/lib/perl5/vendor_perl/5.26.1/USB/HID/Report
/usr/lib/perl5/vendor_perl/5.26.1/USB/HID/Report.pm
/usr/lib/perl5/vendor_perl/5.26.1/USB/HID/Report/Field.pm
/usr/share/doc/packages/perl-USB-Descriptor
/usr/share/doc/packages/perl-USB-Descriptor/Changes
/usr/share/doc/packages/perl-USB-Descriptor/README
/usr/share/man/man3/USB::Descriptor.3pm.gz
/usr/share/man/man3/USB::Descriptor::Configuration.3pm.gz
/usr/share/man/man3/USB::Descriptor::Device.3pm.gz
/usr/share/man/man3/USB::Descriptor::Endpoint.3pm.gz
/usr/share/man/man3/USB::Descriptor::Interface.3pm.gz
/usr/share/man/man3/USB::HID.3pm.gz
/usr/share/man/man3/USB::HID::Descriptor::Class.3pm.gz
/usr/share/man/man3/USB::HID::Descriptor::Interface.3pm.gz
/usr/share/man/man3/USB::HID::Descriptor::Report.3pm.gz
/usr/share/man/man3/USB::HID::Report.3pm.gz
/usr/share/man/man3/USB::HID::Report::Field.3pm.gz

 
ICM