Struct atsamd21_hal::clock::GenericClockController [] [src]

pub struct GenericClockController { /* fields omitted */ }

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.

Methods

impl GenericClockController
[src]

[src]

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

[src]

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

[src]

Returns a GClock for gclk1, the 32Khz oscillator.

[src]

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

[src]

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.

impl GenericClockController
[src]

[src]

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.

[src]

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.

[src]

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.

[src]

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.

[src]

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.

[src]

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.

[src]

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.

[src]

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.

[src]

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.

[src]

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.

Trait Implementations

Auto Trait Implementations