stannickel / arduino

Automatically exported from code.google.com/p/arduino
Other
0 stars 0 forks source link

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

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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.

Original issue reported on code.google.com by jaguar3s...@gmail.com on 30 Aug 2012 at 1:28

GoogleCodeExporter commented 9 years ago
Issue 1036 has been merged into this issue.

Original comment by wes...@gmail.com on 30 Sep 2012 at 9:24

GoogleCodeExporter commented 9 years ago
This has been fixed since 1.5.6:
https://github.com/arduino/Arduino/pull/1711

Original comment by c.mag...@arduino.cc on 14 Jan 2015 at 12:13