embassy-stm32

Crates

git

Versions

stm32h745xg-cm7

Flavors

FullBridgeConverter

Struct FullBridgeConverter 

Source
pub struct FullBridgeConverter<T: Instance, CH1: AdvancedChannel<T>, CH2: AdvancedChannel<T>> { /* private fields */ }
Expand description

Fixed-frequency full-bridge converter driver.

Implementations§

Source§

impl<T: Instance, CH1: AdvancedChannel<T>, CH2: AdvancedChannel<T>> FullBridgeConverter<T, CH1, CH2>

Source

pub fn new(_ch1: &mut CH1, _ch2: &mut CH2, frequency: Hertz) -> Self

Create a new HRTIM bridge converter driver.

Source

pub fn start(&mut self)

Start HRTIM.

Source

pub fn stop(&mut self)

Stop HRTIM.

Source

pub fn get_max_compare_value_master(&mut self) -> u16

Get the maximum compare value of a duty cycle

Source

pub fn get_max_compare_value_ch1(&mut self) -> u16

Get the maximum compare value of a duty cycle

Source

pub fn get_max_compare_value_ch2(&mut self) -> u16

Get the maximum compare value of a duty cycle

Source

pub fn set_dead_time(&mut self, value: u16)

Set the dead time as a proportion of the maximum compare value

Source

pub fn set_duty(&mut self, requested_duty: u16)

The duty is the period in which the primary switch is active

Source

pub fn enable_outputs(&mut self)

The duty is the period in which the primary switch is active

Source

pub fn disable_outputs(&mut self)

The duty is the period in which the primary switch is active

Source

pub fn set_minimum_duty(&mut self, duty: u16)

Set minimum FET pulse width in counts

Auto Trait Implementations§

§

impl<T, CH1, CH2> Freeze for FullBridgeConverter<T, CH1, CH2>

§

impl<T, CH1, CH2> RefUnwindSafe for FullBridgeConverter<T, CH1, CH2>

§

impl<T, CH1, CH2> Send for FullBridgeConverter<T, CH1, CH2>
where T: Send, CH1: Send, CH2: Send,

§

impl<T, CH1, CH2> Sync for FullBridgeConverter<T, CH1, CH2>
where T: Sync, CH1: Sync, CH2: Sync,

§

impl<T, CH1, CH2> Unpin for FullBridgeConverter<T, CH1, CH2>
where T: Unpin, CH1: Unpin, CH2: Unpin,

§

impl<T, CH1, CH2> UnwindSafe for FullBridgeConverter<T, CH1, CH2>
where T: UnwindSafe, CH1: UnwindSafe, CH2: 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> ToMutAligned for T
where T: ?Sized,

Source§

type Element = T

Element
Source§

fn to_mut_aligned<A>(&mut self) -> &mut Aligned<A, <T as ToMutAligned>::Element>
where A: Alignment,

Create a type-checked aligned value from a value that is aligned.
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.