embassy-stm32

Crates

git

Versions

stm32g474pe

Flavors

ResonantConverter

Struct ResonantConverter 

Source
pub struct ResonantConverter<TIM, PSCL> { /* private fields */ }
Expand description

Variable-frequency resonant converter driver.

Implementations§

Source§

impl<TIM, PSCL: HrtimPrescaler> ResonantConverter<TIM, PSCL>
where TIM: InstanceX + HrPwmAdvExt<PreloadSource = PreloadSource> + HrPwmAdvExt, HrTim<TIM, PSCL, NoDma, NoDma>: HrTimer,

Source

pub fn new<P1, P2>( timer: TIM, pin1: P1, pin2: P2, prescaler: PSCL, min_frequency: Hertz, max_frequency: Hertz, hr_control: &mut HrPwmControl, deadtime_cfg: DeadtimeConfig, ) -> Self
where P1: Output1Pin<TIM>, P2: Output2Pin<TIM>, HrPwmBuilder<TIM, PSCL, PreloadSource, P1, P2>: HrPwmBuilderExt<TIM, PSCL, P1, P2>,

Create a new variable-frequency resonant converter driver.

Source

pub fn set_period(&mut self, period: u16)

Set the timer period.

Source

pub fn get_min_period(&mut self) -> u16

Get the minimum compare value of a duty cycle

Source

pub fn get_max_period(&mut self) -> u16

Get the maximum compare value of a duty cycle

Auto Trait Implementations§

§

impl<TIM, PSCL> Freeze for ResonantConverter<TIM, PSCL>

§

impl<TIM, PSCL> RefUnwindSafe for ResonantConverter<TIM, PSCL>
where TIM: RefUnwindSafe, PSCL: RefUnwindSafe,

§

impl<TIM, PSCL> Send for ResonantConverter<TIM, PSCL>
where TIM: Send, PSCL: Send,

§

impl<TIM, PSCL> Sync for ResonantConverter<TIM, PSCL>
where TIM: Sync, PSCL: Sync,

§

impl<TIM, PSCL> Unpin for ResonantConverter<TIM, PSCL>
where TIM: Unpin, PSCL: Unpin,

§

impl<TIM, PSCL> UnwindSafe for ResonantConverter<TIM, PSCL>
where TIM: UnwindSafe, PSCL: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.