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

Broadcom port: Add 'fake' RTC support #7474

Merged
merged 5 commits into from Jan 25, 2023
Merged

Conversation

RetiredWizard
Copy link

The Broadcom chips apparently don't have an RTC, so this PR uses the timer to add dummy RTC responses and allow resonable results from time.localtime() as well as setting the time and date while the board is powered. I believe this fixes #5790

The Broadcom chips apparently don't have an RTC, so this PR uses the
timer to add dummy RTC responses and allow resonable results
from time.localtime() as well as setting the time and date while
the board is powered.
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One stray comment. Looks good otherwise. Thanks!

ports/broadcom/common-hal/rtc/RTC.c Outdated Show resolved Hide resolved
@RetiredWizard
Copy link
Author

Actually after looking this over again I'm wondering if CIRCUITPY_RTC = 1 is necessary. I'll try a test build this afternoon and pull it out if it builds without the parameter being set there.

Full build includes the RTC bits so don't need to enable it
in ports/broadcom/mpconfigport.mk
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tannewt tannewt merged commit f56a6a9 into adafruit:main Jan 25, 2023
@RetiredWizard RetiredWizard deleted the broadcomRTC branch January 25, 2023 19:35
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

Successfully merging this pull request may close these issues.

Broadcom: add RTC support
2 participants