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

Error in GetCourseTrimEnabled() #5

Open
asuarez-gh opened this issue Apr 9, 2018 · 0 comments
Open

Error in GetCourseTrimEnabled() #5

asuarez-gh opened this issue Apr 9, 2018 · 0 comments

Comments

@asuarez-gh
Copy link

asuarez-gh commented Apr 9, 2018

In the function

bool RTCC_MCP7940N::GetCourseTrimEnabled() { return this->GetFlag(0x08, B100); }

you maybe reading from the wrong register. Register 8 holds the trim value but register 7 holds the enable bit value. You had it correct in the set function.

void RTCC_MCP7940N::SetCourseTrimEnabled(bool enabled) { this->SetBits(0x07, B100, enabled << 2); }

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