Struct l298n::L298N[][src]

pub struct L298N<INA, INB, INC, IND, PWMA, PWMB> where
    INA: OutputPin,
    INB: OutputPin,
    INC: OutputPin,
    IND: OutputPin,
    PWMA: PwmPin,
    PWMB: PwmPin
{ pub a: Motor<INA, INB, PWMA>, pub b: Motor<INC, IND, PWMB>, }
Expand description

Struct for L298N. Two enable inputs are provided to enable or disable the device independently of the input signals. The emitters of the lower transistors of each bridge are connected together and the corresponding external terminal can be used for the connection of an external sensing resistor. An additional supply input is provided so that the logic works at a lower voltage.

Fields

a: Motor<INA, INB, PWMA>

motor A

b: Motor<INC, IND, PWMB>

motor B

Implementations

impl<INA, INB, INC, IND, PWMA, PWMB> L298N<INA, INB, INC, IND, PWMA, PWMB> where
    INA: OutputPin,
    INB: OutputPin,
    INC: OutputPin,
    IND: OutputPin,
    PWMA: PwmPin,
    PWMB: PwmPin
[src]

pub fn new(
    ina1: INA,
    ina2: INB,
    pwma: PWMA,
    inb1: INC,
    inb2: IND,
    pwmb: PWMB
) -> L298N<INA, INB, INC, IND, PWMA, PWMB> where
    INA: OutputPin,
    INB: OutputPin,
    INC: OutputPin,
    IND: OutputPin,
    PWMA: PwmPin,
    PWMB: PwmPin
[src]

Creates a new L298N motor controller

Trait Implementations

impl<INA: Debug, INB: Debug, INC: Debug, IND: Debug, PWMA: Debug, PWMB: Debug> Debug for L298N<INA, INB, INC, IND, PWMA, PWMB> where
    INA: OutputPin,
    INB: OutputPin,
    INC: OutputPin,
    IND: OutputPin,
    PWMA: PwmPin,
    PWMB: PwmPin
[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<INA, INB, INC, IND, PWMA, PWMB> Send for L298N<INA, INB, INC, IND, PWMA, PWMB> where
    INA: Send,
    INB: Send,
    INC: Send,
    IND: Send,
    PWMA: Send,
    PWMB: Send

impl<INA, INB, INC, IND, PWMA, PWMB> Sync for L298N<INA, INB, INC, IND, PWMA, PWMB> where
    INA: Sync,
    INB: Sync,
    INC: Sync,
    IND: Sync,
    PWMA: Sync,
    PWMB: Sync

impl<INA, INB, INC, IND, PWMA, PWMB> Unpin for L298N<INA, INB, INC, IND, PWMA, PWMB> where
    INA: Unpin,
    INB: Unpin,
    INC: Unpin,
    IND: Unpin,
    PWMA: Unpin,
    PWMB: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.