[2.0.x] SERIAL_XON_XOFF not supported on USB-native AVR devices#8652
Conversation
User could enable SERIAL_XON_XOFF on USB-native devices and it would not be enabled without warning, but M115 would report the capability as available.
|
@ejtagle - I assume Due wouldn't have any problem with how this is done ? Also, you mentioned before the idea of improving flow control for USB-native via just halting acceptance of the data when the buffer was full, but what would be the downside of using the same flow control as on AVR ? It may not be quite as optimal, but wouldn't it be less implimentation effort on the host side ? |
|
AVR with an USB native port (i don't have a board based on such device) could be made to just stall the RX endpoint, and that leads to "natural" flow control. It could be done. |
| #error "TX_BUFFER_SIZE must be 0, a power of 2 greater than 1, and no greater than 256." | ||
| #endif | ||
| #elif ENABLED(SERIAL_XON_XOFF) | ||
| #error "SERIAL_XON_XOFF is not supported on USB-native AVR devices." |
There was a problem hiding this comment.
This will never get triggered due to the #undef. Either the code should have the #undef with a warning, or just this #error.
There was a problem hiding this comment.
I believe it was the other way around, the #undef SERIAL_XON_XOFF didn't get executed because compile didn't complete when SanityCheck threw the error. I left the redundant check in Conditional_adv.h since it didn't seem to hurt, and might prevent future issue if something ever caused the SanityCheck to break. But thinking about your comment, perhaps it is "smarter" to not try and be so smart, lest be met with unintended consequences (if compilation priority changes for some reason, for example). I'll double check anyway to make sure current behavior throws the error instead of silent undef.
There was a problem hiding this comment.
Weird. The sanity check always comes after Conditionals_post.h.
User could enable SERIAL_XON_XOFF on USB-native devices and it would not be enabled without warning, but M115 would report the capability as available.