Skip to content

HardwareSerial allocates ring buffers (etc) based on existance of USARTs not user's use of USART [imported] #1021

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

Closed
cmaglie opened this issue Nov 15, 2012 · 1 comment

Comments

@cmaglie
Copy link
Member

cmaglie commented Nov 15, 2012

This is Issue 1021 moved from a Google Code project.
Added by 2012-08-30T01:28:11.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Defect, Priority-Medium

Original description

Am I correct in understanding the code from HardwareSerial.cpp allocates either 16 or 64 bytes (based on the size of RAM) for a ring buffer based on the existence of the UBRRxH register?

This seems presumptuous.
Perhaps the user better knows which USARTS he's using.

Could the code be revised to allow user defined symbols before inclusion of HardwareSerial.cpp to specify the USARTs to be used.

Similarly, perhaps the user might define SERIAL_BUFFER_SIZE (based on USART speed, F_CPU and application experience) to be used instead of the default.

While we're reducing RAM, should the head & tail be 8 bit.

@cmaglie
Copy link
Member Author

cmaglie commented Jan 14, 2015

This has been fixed since 1.5.6:
#1711

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants