Struct serpente::thumbv6m::clock::GenericClockController[][src]

pub struct GenericClockController { /* fields omitted */ }
Expand description

GenericClockController encapsulates the GCLK hardware. It provides a type safe way to configure the system clocks. Initializing the GenericClockController instance configures the system to run at 48Mhz by setting gclk1 as a 32khz source and feeding it into the DFLL48 hardware which in turn drives gclk0 at 48Mhz.

Implementations

Reset the clock controller, configure the system to run at 48Mhz and reset various clock dividers.

Reset the clock controller, configure the system to run at 48Mhz and reset various clock dividers.

Reset the clock controller, configure the system to run at 8Mhz from internal 8 MHz RC clock (no PLL) and reset various clock dividers.

Returns a GClock for gclk0, the system clock generator at 48Mhz

Returns a GClock for gclk1, the 32Khz oscillator.

Returns the GClock for the specified clock generator. If that clock generator has not yet been configured, returns None.

Configures a clock generator with the specified divider and source. divider is a linear divider to be applied to the clock source. While the hardware also supports an exponential divider, this function doesn’t expose that functionality at this time. improve_duty_cycle is a boolean that, when set to true, enables a 5o/50 duty cycle for odd divider values. Returns a GClock for the configured clock generator. Returns None if the clock generator has already been configured.

Enables or disables the given GClk from operation in standby.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

Configure the clock for peripheral(s) that match the name of this function to use the specific clock generator. The GClock parameter may be one of default clocks return from gclk0(), gclk1() or a clock configured by the host application using the configure_gclk_divider_and_source method. Returns a typed token that proves that the clock has been configured; the peripheral initialization code will typically require that this clock token be passed in to ensure that the clock has been initialized appropriately. Returns None is the specified generic clock has already been configured.

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

Performs the conversion.

Performs the conversion.

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.