python-libusb1 icon indicating copy to clipboard operation
python-libusb1 copied to clipboard

add flags set method for tansfer

Open wang0618 opened this issue 2 years ago • 1 comments

This PR adds a setFlags() method to USBTransfer to set the libusb_transfer.flags

wang0618 avatar Dec 22 '23 05:12 wang0618

My apologies, I completely missed the bug report you opened as well as this merge request.

I agree that flags need to be exposed.

This said, of the currently-defined 4 flags, two would cause crashes, so the code must prevent the user from setting those. This would probably best be done by only allowing the known-safe flags, raising if the caller tries to set anything else.

I also think the currently-set flags should be exposed, probably by adding a getFlags method. I wonder what return type would be best.

Could you implement such changes and update this merge request ?

vpelletier avatar Mar 06 '24 10:03 vpelletier

Closing as superseded by b9e1d7debdfe59d8cc7f83be9cb5105c1d65997b .

vpelletier avatar Dec 28 '24 13:12 vpelletier