Skip to content

Serial class use ram for buffer even if not used #1259

Closed
@lestofante

Description

@lestofante

Hi, actually the Serial class always initialize its buffer. This is bad for example on mega, where much ram is "stolen"
I've modded the serial library to allocate the ram only if begin() is called. also the call of end() free the buffer.

This is backward compatible, but has been tested only by me, so it need better testing.
it is based on HardwareSerial.cpp of 1.0.2

code: http://arduino.cc/forum/index.php?action=dlattach;topic=141254.0;attach=33317

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions