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