pub struct CTIMER<State, Channel1State, Channel2State, Channel3State> {
pub channels: Channels<State, Channel1State, Channel2State, Channel3State>,
/* private fields */
}Expand description
Interface to a CTimer peripheral
Controls the CTimer. Use Peripherals to gain access to an instance of
this struct.
Please refer to the module documentation for more information.
Fields§
§channels: Channels<State, Channel1State, Channel2State, Channel3State>The PWM channels of this CTIMER
Implementations§
Source§impl<Channel1State, Channel2State, Channel3State> CTIMER<Disabled, Channel1State, Channel2State, Channel3State>
impl<Channel1State, Channel2State, Channel3State> CTIMER<Disabled, Channel1State, Channel2State, Channel3State>
Source§impl CTIMER<Enabled, Attached, Detached, Detached>
impl CTIMER<Enabled, Attached, Detached, Detached>
Sourcepub fn attach<Pin>(
self,
_: Function<<Channel2 as Trait>::Output, Assigned<Pin>>,
) -> CTIMER<Enabled, Attached, Attached, Detached>
pub fn attach<Pin>( self, _: Function<<Channel2 as Trait>::Output, Assigned<Pin>>, ) -> CTIMER<Enabled, Attached, Attached, Detached>
Attach an output function to channel 2
This function is only available if an output function has been attached to channel 1, but no output functions has been attached to channel 2.
Source§impl CTIMER<Enabled, Attached, Attached, Detached>
impl CTIMER<Enabled, Attached, Attached, Detached>
Sourcepub fn attach<Pin>(
self,
_: Function<<Channel3 as Trait>::Output, Assigned<Pin>>,
) -> CTIMER<Enabled, Attached, Attached, Attached>
pub fn attach<Pin>( self, _: Function<<Channel3 as Trait>::Output, Assigned<Pin>>, ) -> CTIMER<Enabled, Attached, Attached, Attached>
Attach an output function to channel 3
This function is only available if output functions have been attached to channels 1 and 2, but no output functions has been attached to channel 3.
Source§impl<Channel1State, Channel2State, Channel3State> CTIMER<Enabled, Channel1State, Channel2State, Channel3State>
impl<Channel1State, Channel2State, Channel3State> CTIMER<Enabled, Channel1State, Channel2State, Channel3State>
Source§impl<State, Channel1State, Channel2State, Channel3State> CTIMER<State, Channel1State, Channel2State, Channel3State>
impl<State, Channel1State, Channel2State, Channel3State> CTIMER<State, Channel1State, Channel2State, Channel3State>
Sourcepub fn free(self) -> CTIMER0
pub fn free(self) -> CTIMER0
Return the raw peripheral
This method serves as an escape hatch from the HAL API. It returns the raw peripheral, allowing you to do whatever you want with it, without limitations imposed by the API.
If you are using this method because a feature you need is missing from the HAL API, please open an issue or, if an issue for your feature request already exists, comment on the existing issue, so we can prioritize it accordingly.
Trait Implementations§
Source§impl Pwm for CTIMER<Enabled, Attached, Attached, Attached>
impl Pwm for CTIMER<Enabled, Attached, Attached, Attached>
Source§type Channel = Channels123
type Channel = Channels123
Pwm interface Read moreSource§fn get_period(&self) -> Self::Time
fn get_period(&self) -> Self::Time
Source§fn get_max_duty(&self) -> Self::Duty
fn get_max_duty(&self) -> Self::Duty
Source§fn set_period<P>(&mut self, period: P)
fn set_period<P>(&mut self, period: P)
Source§impl Pwm for CTIMER<Enabled, Attached, Attached, Attached>
impl Pwm for CTIMER<Enabled, Attached, Attached, Attached>
Source§type Error = Infallible
type Error = Infallible
Pwm errorsSource§type Channel = Channels123
type Channel = Channels123
Pwm interface Read moreSource§fn disable(&mut self, channel: &Self::Channel) -> Result<(), Self::Error>
fn disable(&mut self, channel: &Self::Channel) -> Result<(), Self::Error>
channelSource§fn enable(&mut self, channel: &Self::Channel) -> Result<(), Self::Error>
fn enable(&mut self, channel: &Self::Channel) -> Result<(), Self::Error>
channelSource§fn get_duty(&self, channel: &Self::Channel) -> Result<Self::Duty, Self::Error>
fn get_duty(&self, channel: &Self::Channel) -> Result<Self::Duty, Self::Error>
Source§fn get_max_duty(&self) -> Result<Self::Duty, Self::Error>
fn get_max_duty(&self) -> Result<Self::Duty, Self::Error>
Source§impl Pwm for CTIMER<Enabled, Attached, Attached, Detached>
impl Pwm for CTIMER<Enabled, Attached, Attached, Detached>
Source§type Channel = Channels12
type Channel = Channels12
Pwm interface Read moreSource§fn get_period(&self) -> Self::Time
fn get_period(&self) -> Self::Time
Source§fn get_max_duty(&self) -> Self::Duty
fn get_max_duty(&self) -> Self::Duty
Source§fn set_period<P>(&mut self, period: P)
fn set_period<P>(&mut self, period: P)
Source§impl Pwm for CTIMER<Enabled, Attached, Attached, Detached>
impl Pwm for CTIMER<Enabled, Attached, Attached, Detached>
Source§type Error = Infallible
type Error = Infallible
Pwm errorsSource§type Channel = Channels12
type Channel = Channels12
Pwm interface Read moreSource§fn disable(&mut self, channel: &Self::Channel) -> Result<(), Self::Error>
fn disable(&mut self, channel: &Self::Channel) -> Result<(), Self::Error>
channelSource§fn enable(&mut self, channel: &Self::Channel) -> Result<(), Self::Error>
fn enable(&mut self, channel: &Self::Channel) -> Result<(), Self::Error>
channelSource§fn get_duty(&self, channel: &Self::Channel) -> Result<Self::Duty, Self::Error>
fn get_duty(&self, channel: &Self::Channel) -> Result<Self::Duty, Self::Error>
Source§fn get_max_duty(&self) -> Result<Self::Duty, Self::Error>
fn get_max_duty(&self) -> Result<Self::Duty, Self::Error>
Source§impl Pwm for CTIMER<Enabled, Attached, Detached, Detached>
impl Pwm for CTIMER<Enabled, Attached, Detached, Detached>
Source§type Channel = Channels1
type Channel = Channels1
Pwm interface Read moreSource§fn get_period(&self) -> Self::Time
fn get_period(&self) -> Self::Time
Source§fn get_max_duty(&self) -> Self::Duty
fn get_max_duty(&self) -> Self::Duty
Source§fn set_period<P>(&mut self, period: P)
fn set_period<P>(&mut self, period: P)
Source§impl Pwm for CTIMER<Enabled, Attached, Detached, Detached>
impl Pwm for CTIMER<Enabled, Attached, Detached, Detached>
Source§type Error = Infallible
type Error = Infallible
Pwm errorsSource§type Channel = Channels1
type Channel = Channels1
Pwm interface Read moreSource§fn disable(&mut self, channel: &Self::Channel) -> Result<(), Self::Error>
fn disable(&mut self, channel: &Self::Channel) -> Result<(), Self::Error>
channelSource§fn enable(&mut self, channel: &Self::Channel) -> Result<(), Self::Error>
fn enable(&mut self, channel: &Self::Channel) -> Result<(), Self::Error>
channel