WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Potential typo/bug in HardwareSerial::_tx_udr_empty_irq? #602

@ziriax

Description

@ziriax

I noticed the following code in HardwareSerial::_tx_udr_empty_irq:

#ifdef MPCM0
*_ucsra = ((*_ucsra) & ((1 << U2X0) | (1 << MPCM0))) | (1 << TXC0);
#else
*_ucsra = ((*_ucsra) & ((1 << U2X0) | (1 << TXC0)));
#endif

Shouldn't

*_ucsra = ((*_ucsra) & ((1 << U2X0) | (1 << TXC0)));

be

*_ucsra = ((*_ucsra) & ((1 << U2X0))) | (1 << TXC0);

just like the line in #ifdef MPCM0?

Because now it preserves the TXC0 bit instead of setting it?

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