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

Add shadow register for UBRRH to keep it separate from UCSRC #309

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 27, 2018

  1. Add shadow register for UBRRH to keep it separate from UCSRC

    In e.g. ATmega8 UBRRH and UCSRC registers share the same I/O location.
    Bit URSEL decides in which physical register written data should go.
    As there are now more registers then I/O locations, "shadow" versions of
    certain regbit functions that store to a pointer ("shadow register")
    instead of the main registers in avr->data[] were introduced.
    UBRRH was moved into a shadow register, while UCSRC stays a regular register.
    Therefore, writes to UBRRH/UCSRC with URSEL bit set do not set the baudrate
    falsely anymore.
    StefanKrupop committed Oct 27, 2018
    Configuration menu
    Copy the full SHA
    0bc442b View commit details
    Browse the repository at this point in the history