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

Fixing microcontroller.cpu on multi-core cpus and adding microcontroller.cpus #4087

Merged
merged 4 commits into from
Feb 1, 2021
Merged

Fixing microcontroller.cpu on multi-core cpus and adding microcontroller.cpus #4087

merged 4 commits into from
Feb 1, 2021

Conversation

DavePutz
Copy link
Collaborator

This will allow microcontroller.cpu.temperature, etc. to work properly on an RP2040 or other multi-cpu chip. It will default to the values for cpu 0. In addition, it adds microcontroller.cpus, indexed by cpu number, to allow access to the values for other cpus (for example, microcontroller.cpus[1].voltage) Note that microcontroller.cpus is only added for chips where CIRCUITPY_PROCESSOR_COUNT is defined to be > 1.

Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

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

LGTM. Just a typo to fix.

shared-bindings/microcontroller/__init__.c Outdated Show resolved Hide resolved
@dhalbert dhalbert requested a review from tannewt January 29, 2021 17:51
Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks!

@dhalbert dhalbert merged commit 459f323 into adafruit:main Feb 1, 2021
@DavePutz DavePutz deleted the cpu_temp_doc branch April 28, 2021 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants