-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Support for different size of HardwareSerial TX and RX buffers. #1955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Added support for different size of TX and RX buffer sizes. Added support for buffer sizes bigger than 256 bytes. Added support for different size of TX and RX buffer sizes. The default values remain the same. If you want to have different values define SERIAL_TX_BUFFER_SIZE and SERIAL_RX_BUFFER_SIZE on the command line Added support for buffer sizes bigger than 256 bytes. The type of the indexes is decided upon the size of the buffers. So there is no increase in program/data size when the buffers are smaller than 257
The gist of the commit looks good to me. I've left some comments inline in the commit. As you are saying, your commit contains two changes. I'd rather see them as two separate commits, since these changes are really different and unrelated. Could you separate them? |
Actually there are 3 changes.
The white space around && is not needed (code runs like that on my system) but it makes the code more readable.
|
Oh, indeed.
True. Also, in the end it's the Arduino team that gets to decide, not me :-) If you keep it as one commit, perhaps you could change the first line (which should be a useful summary by itself) to something like "Improve HardwareSerial buffer size handling"?
Yeah, that's what I meant, sorry if I was unclear. |
Added support for buffer sizes bigger than 256 bytes. Added possibility to overrule the default size. Added support for different size of TX and RX buffer sizes. The default values remain the same. You can however specify a different value for TX and RX buffer Added possibility to overrule the default size. If you want to have different values define SERIAL_TX_BUFFER_SIZE and SERIAL_RX_BUFFER_SIZE on the command line Added support for buffer sizes bigger than 256 bytes. Because of the possibility to change the size of the buffer sizes longer than 256 must be supported. The type of the indexes is decided upon the size of the buffers. So there is no increase in program/data size when the buffers are smaller than 257
I did the changes as you proposed. Lets hope the arduino core team takes this one aboard. |
Changes look good to me, I have no further remarks on the code. Regarding the commits, you should probably squash the two commits together, using the commit message of the second one, or perhaps the core team can just do that when merging this request. Thanks! |
can the core team please comment on whether this could be accepted or not? |
The patch looks good, but it gives me a compile error if I compile the AsciiTableExample for the Uno Board:
probably you forget to update HardwareSerial_private.h with the new constants name. C |
I forgot to upload the HardwareSerial_private.h file. |
Thanks, I've added just a little change to the variable type for index calculation. |
thanks indeed I overlooked that one. |
This relates to issue #1929
Added support for different size of TX and RX buffer sizes.
Added support for buffer sizes bigger than 256 bytes.
Added support for different size of TX and RX buffer sizes.
The default values remain the same. If you want to have different values
define SERIAL_TX_BUFFER_SIZE and SERIAL_RX_BUFFER_SIZE on the command
line
Added support for buffer sizes bigger than 256 bytes.
The type of the indexes is decided upon the size of the buffers. So
there is no increase in program/data size when the buffers are smaller
than 257