Struct grand_central_m4::thumbv7em::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 120MHz by taking the DFLL48
and feeding it into the DPLL0 hardware which multiplies the
signal by 2.5x.
Implementations
pub fn with_internal_32kosc(
gclk: GCLK,
mclk: &mut MCLK,
osc32kctrl: &mut OSC32KCTRL,
oscctrl: &mut OSCCTRL,
nvmctrl: &mut NVMCTRL
) -> GenericClockController
pub fn with_internal_32kosc(
gclk: GCLK,
mclk: &mut MCLK,
osc32kctrl: &mut OSC32KCTRL,
oscctrl: &mut OSCCTRL,
nvmctrl: &mut NVMCTRL
) -> GenericClockController
Reset the clock controller, configure the system to run at 120Mhz and reset various clock dividers.
pub fn with_external_32kosc(
gclk: GCLK,
mclk: &mut MCLK,
osc32kctrl: &mut OSC32KCTRL,
oscctrl: &mut OSCCTRL,
nvmctrl: &mut NVMCTRL
) -> GenericClockController
pub fn with_external_32kosc(
gclk: GCLK,
mclk: &mut MCLK,
osc32kctrl: &mut OSC32KCTRL,
oscctrl: &mut OSCCTRL,
nvmctrl: &mut NVMCTRL
) -> GenericClockController
Reset the clock controller, configure the system to run at 120Mhz and reset various clock dividers.
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 50/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.
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.