Struct nrf52840_hal::comp::Comp [−][src]
pub struct Comp { /* fields omitted */ }
Expand description
A safe wrapper around the COMP
peripheral.
Implementations
Takes ownership of the COMP
peripheral, returning a safe wrapper.
Sets the speed and power mode of the comparator.
Sets analog reference pin.
Sets comparator mode to differential with external Vref pin.
Upward hysteresis threshold in single ended mode Vup = (value+1)/64*Vref
.
Downward hysteresis threshold in single ended mode Vdown = (value+1)/64*Vref
.
Enables/disables differential comparator hysteresis (50mV).
Enables COMP_LPCOMP
interrupt triggering on the specified event.
Disables COMP_LPCOMP
interrupt triggering on the specified event.
Returns reference to Up
transition event endpoint for PPI.
Returns reference to Down
transition event endpoint for PPI.
Returns reference to Cross
transition event endpoint for PPI.
Marks event as handled.
Marks all events as handled.
Returns the output state of the comparator.