pub struct Comp { /* private fields */ }
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 Vref of the comparator in single ended mode.

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.

Enables the comparator and waits until it’s ready to use.

Disables the comparator.

Checks if the Up transition event has been triggered.

Checks if the Down transition event has been triggered.

Checks if the Cross transition event has been triggered.

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.

Consumes self and returns back the raw COMP peripheral.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Casts the value.
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Casts the value.
Casts the value.
Casts the value.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Performs the conversion.
Performs the conversion.
Casts the value.
Casts the value.
Should always be Self
Casts the value.
Casts the value.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Casts the value.
Casts the value.
Casts the value.
Casts the value.