<< hid_get_device_string HID Device Enumeration HID Device Reports >>

USB Comunication Toolbox for Scilab >> HIDAPI Library > HID Device Enumeration > hid_next_device

hid_next_device

Change the actual Hid Device enumerated for the next one

Calling Sequence

success_next=hid_next_device()

Parameters

success_next
: This function returns 0 on success and -1 on error.

Description

Change the current HID Device enumerated for the next one

Examples

enum_success=hid_enumerate();
if( ~( enum_success < 0 ) ) then
    success_next = 0;
    M_Vendor=list();
    M_Product=list();
    i=0;
    while( ~( success_next < 0 ) ) 
       i=i+1;
       [success_dev,vendor_id,product_id]=hid_get_device_string ();
       M_Vendor($+1)=vendor_id;
       M_Product($+1)=product_id;
       success_next=hid_next_device(); 
    end
    free_success=hid_free_enumeration();
    Devices=zeros(i,2)
    for k=1:i
        Devices(k,1)=M_Vendor(k)
        Devices(k,2)=M_Product(k)
    end
    Devices=dec2hex(Devices);
    disp(Devices);
end

See Also

Authors

<< hid_get_device_string HID Device Enumeration HID Device Reports >>