Skip to content

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

Closed
@cmaglie

Description

@cmaglie

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions