lufa icon indicating copy to clipboard operation
lufa copied to clipboard

Fix #106 CDC Serial send blocks when host closes connection

Open NicoHood opened this issue 7 years ago • 5 comments

I've only added it for the sending part, as Receiving should work independent. Maybe you know better if we also need it there, but I dont think so as it wont block anything.

NicoHood avatar Jan 16 '18 14:01 NicoHood

@abcminiuser Any chance to see this feature in the near feature?

NicoHood avatar Apr 02 '18 06:04 NicoHood

Looks ok to me, but some people might want a class driver config option to ignore DTR. I'm about to leave on a business trip to the US for 10 days, I'll have to go through this and the other patches when I get back.

abcminiuser avatar Apr 04 '18 09:04 abcminiuser

You could add it as compile time option to keep compatibility to older APIs. But i would enable it as default, that makes sense to me.

NicoHood avatar Apr 04 '18 14:04 NicoHood

I think the best course of action is to add a new RequireDTR option to the Config section of USB_ClassInfo_CDC_Device_t, and set that to true in all the demos in the LUFA tree. That way people with old code will get the old behavior for backwards compatibility, but those basing their code off the latest LUFA version will have it enabled by default.

abcminiuser avatar Apr 17 '18 00:04 abcminiuser

But it will increase the code size even more, on top of the DTR check itself. It should be either the new default or a compile time option if you ask me. This is nothing you would want to change at runtime.

NicoHood avatar Apr 17 '18 13:04 NicoHood