[][src]Trait avr_hal_generic::usart::BaudrateExt

pub trait BaudrateExt {
    pub fn into_baudrate<CLOCK: Clock>(self) -> Baudrate<CLOCK>;
}

Provide a into_baudrate() method for integers.

This extension trait allows conveniently initializing a baudrate by using

let mut serial = arduino_uno::Serial::new(
    dp.USART0,
    pins.d0,
    pins.d1.into_output(&mut pins.ddr),
    57600.into_baudrate(),
);

instead of having to call Baudrate::new(57600).

Required methods

pub fn into_baudrate<CLOCK: Clock>(self) -> Baudrate<CLOCK>[src]

Calculate baudrate parameters from this number.

Loading content...

Implementors

impl BaudrateExt for u32[src]

Loading content...