lufa
lufa copied to clipboard
Fix #106 CDC Serial send blocks when host closes connection
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.
@abcminiuser Any chance to see this feature in the near feature?
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.
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.
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.
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.