Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong bit name in AVR Example #36

Open
zerberus666 opened this issue Nov 17, 2022 · 0 comments
Open

Wrong bit name in AVR Example #36

zerberus666 opened this issue Nov 17, 2022 · 0 comments

Comments

@zerberus666
Copy link

There is wrong bit name in file portserial.c in function void vMBPortSerialEnable( BOOL xRxEnable, BOOL xTxEnable ) :

if( xTxEnable )
    {
        UCSRB |= _BV( TXEN ) | _BV( UDRE );
#ifdef RTS_ENABLE
        RTS_HIGH;
#endif
    }
    else
    {
        UCSRB &= ~( _BV( UDRE ) );
    }

Must be:

if( xTxEnable )
    {
        UCSRB |= _BV( TXEN ) | _BV( UDRIE );
#ifdef RTS_ENABLE
        RTS_HIGH;
#endif
    }
    else
    {
        UCSRB &= ~( _BV( UDRIE ) );
    }

May be UDRIE must be defined like #define UDRIE UDRIE0 //or UDRIE1 in file port.h

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant