pub enum GclkDiv16 {
    Div(u16),
    Div2Pow16,
    Div2Pow17,
}
Expand description

Enum for the clock division factor of Gclk1 only

Choosing the Gclk1 division factor can be complicated, because the set of valid values is not contiguous. For Gclk1, the division factor can be 1-65536 or 131072. GclkDiv16 provides an enum interface to enforce validity of the division factor. See the datasheet for more details.

Variants

Div(u16)

Use a literal division factor

All values in the range [1-65535] are valid. Zero is also valid, but it is interpreted as 1.

Div2Pow16

Use a division factor of 2^16 = 65536

Div2Pow17

Use a division factor of 2^17 = 131072

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Returns the “default value” for a type. Read more
Returns the actual clock divider value as a u32
Return the corresponding DIVSEL and and DIV register fields

Auto Trait Implementations

Blanket Implementations

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

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self
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.