Skip to content

Add COMP module#189

Merged
jamesmunns merged 10 commits intonrf-rs:masterfrom
kalkyl:comp
Aug 2, 2020
Merged

Add COMP module#189
jamesmunns merged 10 commits intonrf-rs:masterfrom
kalkyl:comp

Conversation

@kalkyl
Copy link
Copy Markdown
Contributor

@kalkyl kalkyl commented Aug 1, 2020

Added a HAL module for the COMP analog comparator peripheral.
The comparator compares an input voltage (Vin) against a second input voltage (Vref).
Vin can be derived from an analog input pin (AIN0-AIN7).
Vref can be derived from multiple sources depending on the operation mode of the comparator.
Tested on NRF52840-DK

Demo (nRF52840):
https://github.com/kalkyl/nrf-hal/blob/comp/examples/comp-demo/src/main.rs

Comment thread nrf-hal-common/src/comp.rs
Comment thread examples/comp-demo/Embed.toml Outdated
Comment thread nrf-hal-common/src/comp.rs Outdated
Comment thread nrf-hal-common/src/comp.rs
Comment thread nrf-hal-common/src/comp.rs Outdated
Copy link
Copy Markdown
Member

@jamesmunns jamesmunns 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 to me! Thanks!

@jamesmunns
Copy link
Copy Markdown
Member

Merging manually due to false CI failures

@jamesmunns jamesmunns merged commit 833bbcf into nrf-rs:master Aug 2, 2020
@kalkyl kalkyl deleted the comp branch September 4, 2020 13:39
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.

3 participants