Rmp

Struct Rmp 

Source
pub struct Rmp<T, const R: u8>(/* private fields */);

Implementations§

Source§

impl<CAN: Instance, const R: u8> Rmp<CAN, R>

Source

pub fn can<PULL: UpMode>( self, _usb: USB, pins: (impl RInto<CAN::Tx, R>, impl RInto<CAN::Rx<PULL>, R>), rcc: &mut RCC, ) -> Can<CAN, PULL>

Source

pub fn can_loopback(self, usb: USB, rcc: &mut RCC) -> Can<CAN, Floating>

Source§

impl<I2C: Instance, const R: u8> Rmp<I2C, R>

Source

pub fn blocking_i2c( self, pins: (impl RInto<I2C::Scl, R>, impl RInto<I2C::Sda, R>), mode: impl Into<Mode>, rcc: &mut Rcc, start_timeout_us: u32, start_retries: u8, addr_timeout_us: u32, data_timeout_us: u32, ) -> BlockingI2c<I2C>

Source§

impl<I2C: Instance, const R: u8> Rmp<I2C, R>

Source

pub fn i2c( self, pins: (impl RInto<I2C::Scl, R>, impl RInto<I2C::Sda, R>), mode: impl Into<Mode>, rcc: &mut Rcc, ) -> I2c<I2C>

Creates a generic I2C object

Source§

impl<USART: Instance, const R: u8> Rmp<USART, R>

Source

pub fn serial<Otype, PULL: UpMode>( self, pins: (impl RInto<USART::Tx<Otype>, R>, impl RInto<USART::Rx<PULL>, R>), config: impl Into<Config>, rcc: &mut Rcc, ) -> Serial<USART, Otype, PULL>

Source

pub fn tx<Otype>( self, tx_pin: impl RInto<USART::Tx<Otype>, R>, config: impl Into<Config>, rcc: &mut Rcc, ) -> Tx<USART>

Source

pub fn rx<PULL: UpMode>( self, rx_pin: impl RInto<USART::Rx<PULL>, R>, config: impl Into<Config>, rcc: &mut Rcc, ) -> Rx<USART>

Source§

impl<SPI: Instance, const R: u8> Rmp<SPI, R>

Source

pub fn spi<PULL: UpMode>( self, pins: (Option<impl RInto<SPI::MSck, R>>, Option<impl RInto<SPI::Mi<PULL>, R>>, Option<impl RInto<SPI::Mo, R>>), mode: Mode, freq: Hertz, rcc: &mut Rcc, ) -> Spi<SPI, u8, PULL>

Source

pub fn spi_u16<PULL: UpMode>( self, pins: (Option<impl RInto<SPI::MSck, R>>, Option<impl RInto<SPI::Mi<PULL>, R>>, Option<impl RInto<SPI::Mo, R>>), mode: Mode, freq: Hertz, rcc: &mut Rcc, ) -> Spi<SPI, u16, PULL>

Source

pub fn spi_slave<Otype, PULL: UpMode>( self, pins: (Option<impl RInto<SPI::SSck, R>>, Option<impl RInto<SPI::So<Otype>, R>>, Option<impl RInto<SPI::Si<PULL>, R>>), mode: Mode, rcc: &mut RCC, ) -> SpiSlave<SPI, u8, Otype, PULL>

Source

pub fn spi_slave_u16<Otype, PULL: UpMode>( self, pins: (Option<impl RInto<SPI::SSck, R>>, Option<impl RInto<SPI::So<Otype>, R>>, Option<impl RInto<SPI::Si<PULL>, R>>), mode: Mode, rcc: &mut RCC, ) -> SpiSlave<SPI, u16, Otype, PULL>

Source§

impl<const R: u8> Rmp<TIM1, R>

Source

pub fn pwm_input( self, pins: (impl RInto<<TIM1 as TimC<0>>::In, R>, impl RInto<<TIM1 as TimC<1>>::In, R>), dbg: &mut DBG, mode: Configuration, rcc: &mut Rcc, ) -> PwmInput<TIM1>

Source

pub fn qei( self, pins: (impl RInto<<TIM1 as TimC<0>>::In, R>, impl RInto<<TIM1 as TimC<1>>::In, R>), options: QeiOptions, rcc: &mut Rcc, ) -> Qei<TIM1>

Source§

impl<const R: u8> Rmp<TIM2, R>

Source

pub fn pwm_input( self, pins: (impl RInto<<TIM2 as TimC<0>>::In, R>, impl RInto<<TIM2 as TimC<1>>::In, R>), dbg: &mut DBG, mode: Configuration, rcc: &mut Rcc, ) -> PwmInput<TIM2>

Source

pub fn qei( self, pins: (impl RInto<<TIM2 as TimC<0>>::In, R>, impl RInto<<TIM2 as TimC<1>>::In, R>), options: QeiOptions, rcc: &mut Rcc, ) -> Qei<TIM2>

Source§

impl<const R: u8> Rmp<TIM3, R>

Source

pub fn pwm_input( self, pins: (impl RInto<<TIM3 as TimC<0>>::In, R>, impl RInto<<TIM3 as TimC<1>>::In, R>), dbg: &mut DBG, mode: Configuration, rcc: &mut Rcc, ) -> PwmInput<TIM3>

Source

pub fn qei( self, pins: (impl RInto<<TIM3 as TimC<0>>::In, R>, impl RInto<<TIM3 as TimC<1>>::In, R>), options: QeiOptions, rcc: &mut Rcc, ) -> Qei<TIM3>

Source§

impl<const R: u8> Rmp<TIM4, R>

Source

pub fn pwm_input( self, pins: (impl RInto<<TIM4 as TimC<0>>::In, R>, impl RInto<<TIM4 as TimC<1>>::In, R>), dbg: &mut DBG, mode: Configuration, rcc: &mut Rcc, ) -> PwmInput<TIM4>

Source

pub fn qei( self, pins: (impl RInto<<TIM4 as TimC<0>>::In, R>, impl RInto<<TIM4 as TimC<1>>::In, R>), options: QeiOptions, rcc: &mut Rcc, ) -> Qei<TIM4>

Trait Implementations§

Source§

impl<T> From<T> for Rmp<T, 0>

Source§

fn from(value: T) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<T, const R: u8> Freeze for Rmp<T, R>
where T: Freeze,

§

impl<T, const R: u8> RefUnwindSafe for Rmp<T, R>
where T: RefUnwindSafe,

§

impl<T, const R: u8> Send for Rmp<T, R>
where T: Send,

§

impl<T, const R: u8> Sync for Rmp<T, R>
where T: Sync,

§

impl<T, const R: u8> Unpin for Rmp<T, R>
where T: Unpin,

§

impl<T, const R: u8> UnwindSafe for Rmp<T, R>
where T: 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<!> for T

Source§

fn from(t: !) -> T

Converts to this type from the input type.
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, const R: u8> RFrom<T, R> for T

Source§

fn rfrom(value: T) -> T

Source§

impl<S, T, const R: u8> RInto<T, R> for S
where T: RFrom<S, R>,

Source§

fn rinto(self) -> T

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.