Device-USB-Win32Async
view release on metacpan or search on metacpan
Win32Async.pm view on Meta::CPAN
#
<Other Task code>
}
See the libusb-win32 manual for more information about the methods. The
functionality is the same as the libusb function whose name is
the method name prepended with "usb_".
Generally, define a $Context variable which the library will use to keep track of
the asynchronous call. Activate the transfer (read or write, depending on the
endpoint) using submit_async() as shown, then loop calling reap_async_nocancel()
while checking the return code.
You can have any number of async operations pending on different endpoints - just
define multiple context variables as needed (ie - $Context1, $Context2, &c).
=cut
##########################################################################################
#
# Version 0.34 - Added support for asynchronous I/O
#
# The caller supplies a scalar $Context which we use to keep opaque (from the caller)
Win32Async.pm view on Meta::CPAN
Setup a Context for use in subsequent asynchronous operations
=over 4
=item Context
A scalar to store opaque information about the operation
=item Endpoint
The endpoint the asynchronous operation will use
=item Packetsize
The size of the isochronous packets
=back
Returns 0 on success, < 0 on error (consult errno.h for explanation)
=cut
Win32Async.pm view on Meta::CPAN
Setup a Context for use in subsequent asynchronous operations
=over 4
=item Context
A scalar to store opaque information about the operation
=item Endpoint
The endpoint the asynchronous operation will use
=back
Returns 0 on success, < 0 on error (consult errno.h for explanation)
=cut
sub bulk_setup_async {
my $self = shift;
$self->_assert_open();
Win32Async.pm view on Meta::CPAN
Setup a Context for use in subsequent asynchronous operations
=over 4
=item Context
A scalar to store opaque information about the operation
=item Endpoint
The endpoint the asynchronous operation will use
=back
Returns 0 on success, < 0 on error (consult errno.h for explanation)
=cut
sub interrupt_setup_async {
my $self = shift;
$self->_assert_open();
lib/Device/USB/Win32Async.pm view on Meta::CPAN
#
<Other Task code>
}
See the libusb-win32 manual for more information about the methods. The
functionality is the same as the libusb function whose name is
the method name prepended with "usb_".
Generally, define a $Context variable which the library will use to keep track of
the asynchronous call. Activate the transfer (read or write, depending on the
endpoint) using submit_async() as shown, then loop calling reap_async_nocancel()
while checking the return code.
You can have any number of async operations pending on different endpoints - just
define multiple context variables as needed (ie - $Context1, $Context2, &c).
=cut
##########################################################################################
#
# Version 0.34 - Added support for asynchronous I/O
#
# The caller supplies a scalar $Context which we use to keep opaque (from the caller)
lib/Device/USB/Win32Async.pm view on Meta::CPAN
Setup a Context for use in subsequent asynchronous operations
=over 4
=item Context
A scalar to store opaque information about the operation
=item Endpoint
The endpoint the asynchronous operation will use
=item Packetsize
The size of the isochronous packets
=back
Returns 0 on success, < 0 on error (consult errno.h for explanation)
=cut
lib/Device/USB/Win32Async.pm view on Meta::CPAN
Setup a Context for use in subsequent asynchronous operations
=over 4
=item Context
A scalar to store opaque information about the operation
=item Endpoint
The endpoint the asynchronous operation will use
=back
Returns 0 on success, < 0 on error (consult errno.h for explanation)
=cut
sub bulk_setup_async {
my $self = shift;
$self->_assert_open();
lib/Device/USB/Win32Async.pm view on Meta::CPAN
Setup a Context for use in subsequent asynchronous operations
=over 4
=item Context
A scalar to store opaque information about the operation
=item Endpoint
The endpoint the asynchronous operation will use
=back
Returns 0 on success, < 0 on error (consult errno.h for explanation)
=cut
sub interrupt_setup_async {
my $self = shift;
$self->_assert_open();
( run in 0.331 second using v1.01-cache-2.11-cpan-cc502c75498 )