Scilab macro's for hid_close
close_success=closeusb(comu_type)
Close an USB HID Device Open. Set the non blocking state to the device's handle. Scilab macro's for hid_close
This is a macro designed to use the hid_close
The "bulk", "iso" and "cdc" implementantion are missing
n=5; txBuff=init_buff(n); for i=1:n txBuff=setBuffValue(txBuff,i,i); end init_success=initusb("hid"); if ( init_success < 0 ) then disp("unable to initialize the HIDAPI Library"); return else disp("HIDAPI Library initialized"); end open_success=openusb("04D8","010B","hid"); if ( open_success < 0 ) then disp("unable to open device"); return else disp("device open"); end close_success=closeusb("hid"); if ( close_success < 0 ) then disp("unable to closed device"); else disp("device closed"); end exit_success=exitusb("hid"); if ( init_success < 0 ) then disp("unable to free static data associated with HIDAPI Library"); return else disp("HIDAPI Library have been freed all of the static data associated"); end | ![]() | ![]() |