pub fn end(self) {
    let peripheral_ptr;
    unsafe {peripheral_ptr = stm32f4::stm32f446::Peripherals::steal();}
    let rcc = &peripheral_ptr.RCC;

    match self.core {
      1 => {
        let uart1 = &peripheral_ptr.USART1;
        rcc.apb2enr.modify(|_, w| w.usart1en().disabled());
        uart1.cr1.reset();
        uart1.cr2.reset();
        NVIC::mask(Interrupt::USART1);
      },
      2 => {
        let uart2 = &peripheral_ptr.USART2;
        rcc.apb1enr.modify(|_, w| w.usart2en().disabled());
        uart2.cr1.reset();
        uart2.cr2.reset();
        NVIC::mask(Interrupt::USART2);
      },
      3 => {
        let uart3 = &peripheral_ptr.USART3;
        rcc.apb1enr.modify(|_, w| w.usart3en().disabled());
        uart3.cr1.reset();
        uart3.cr2.reset();
        NVIC::mask(Interrupt::USART3);
      },
      4 => {
        let uart4 = &peripheral_ptr.UART4;
        rcc.apb1enr.modify(|_, w| w.uart4en().disabled());
        uart4.cr1.reset();
        uart4.cr2.reset();
        NVIC::mask(Interrupt::UART4);
      },
      5 => {
        let uart5 = &peripheral_ptr.UART5;
        rcc.apb1enr.modify(|_, w| w.uart5en().disabled());
        uart5.cr1.reset();
        uart5.cr2.reset();
        NVIC::mask(Interrupt::UART5);
      },
      6 => {
        let uart6 = &peripheral_ptr.USART6;
        rcc.apb2enr.modify(|_, w| w.usart6en().disabled());
        uart6.cr1.reset();
        uart6.cr2.reset();
        NVIC::mask(Interrupt::USART6);
      },
      _ => unreachable!()
    };

    drop(self);
  }
/// Deacitivates the UART connection and destroys the struct, freeing the core and pins.
Deacitivates the UART connection and destroys the struct, freeing the core and pins.
Deacitivates the UART connection and destroys the struct freeing the core and pins .
pub fn end(self) {
    let peripheral_ptr;
    unsafe {peripheral_ptr = stm32f4::stm32f446::Peripherals::steal();}
    let rcc = &peripheral_ptr.RCC;
    match self.core {
      1 => {
        let uart1 = &peripheral_ptr.USART1;
        rcc.apb2enr.modify(|_, w| w.usart1en().disabled());
        uart1.cr1.reset();
        uart1.cr2.reset();
        NVIC::mask(Interrupt::USART1);
      },
      2 => {
        let uart2 = &peripheral_ptr.USART2;
        rcc.apb1enr.modify(|_, w| w.usart2en().disabled());
        uart2.cr1.reset();
        uart2.cr2.reset();
        NVIC::mask(Interrupt::USART2);
      },
      3 => {
        let uart3 = &peripheral_ptr.USART3;
        rcc.apb1enr.modify(|_, w| w.usart3en().disabled());
        uart3.cr1.reset();
        uart3.cr2.reset();
        NVIC::mask(Interrupt::USART3);
      },
      4 => {
        let uart4 = &peripheral_ptr.UART4;
        rcc.apb1enr.modify(|_, w| w.uart4en().disabled());
        uart4.cr1.reset();
        uart4.cr2.reset();
        NVIC::mask(Interrupt::UART4);
      },
      5 => {
        let uart5 = &peripheral_ptr.UART5;
        rcc.apb1enr.modify(|_, w| w.uart5en().disabled());
        uart5.cr1.reset();
        uart5.cr2.reset();
        NVIC::mask(Interrupt::UART5);
      },
      6 => {
        let uart6 = &peripheral_ptr.USART6;
        rcc.apb2enr.modify(|_, w| w.usart6en().disabled());
        uart6.cr1.reset();
        uart6.cr2.reset();
        NVIC::mask(Interrupt::USART6);
      },
      _ => unreachable!()
    };
    drop(self);
  }
pub fn end ( self ) { let peripheral_ptr ; unsafe { peripheral_ptr = stm32f4 :: stm32f446 :: Peripherals :: steal ( ) ; } let rcc = & peripheral_ptr . RCC ; match self . core { 1 => { let uart1 = & peripheral_ptr . USART1 ; rcc . apb2enr . modify ( | _ , w | w . usart1en ( ) . disabled ( ) ) ; uart1 . cr1 . reset ( ) ; uart1 . cr2 . reset ( ) ; NVIC :: mask ( Interrupt :: USART1 ) ; } , 2 => { let uart2 = & peripheral_ptr . USART2 ; rcc . apb1enr . modify ( | _ , w | w . usart2en ( ) . disabled ( ) ) ; uart2 . cr1 . reset ( ) ; uart2 . cr2 . reset ( ) ; NVIC :: mask ( Interrupt :: USART2 ) ; } , 3 => { let uart3 = & peripheral_ptr . USART3 ; rcc . apb1enr . modify ( | _ , w | w . usart3en ( ) . disabled ( ) ) ; uart3 . cr1 . reset ( ) ; uart3 . cr2 . reset ( ) ; NVIC :: mask ( Interrupt :: USART3 ) ; } , 4 => { let uart4 = & peripheral_ptr . UART4 ; rcc . apb1enr . modify ( | _ , w | w . uart4en ( ) . disabled ( ) ) ; uart4 . cr1 . reset ( ) ; uart4 . cr2 . reset ( ) ; NVIC :: mask ( Interrupt :: UART4 ) ; } , 5 => { let uart5 = & peripheral_ptr . UART5 ; rcc . apb1enr . modify ( | _ , w | w . uart5en ( ) . disabled ( ) ) ; uart5 . cr1 . reset ( ) ; uart5 . cr2 . reset ( ) ; NVIC :: mask ( Interrupt :: UART5 ) ; } , 6 => { let uart6 = & peripheral_ptr . USART6 ; rcc . apb2enr . modify ( | _ , w | w . usart6en ( ) . disabled ( ) ) ; uart6 . cr1 . reset ( ) ; uart6 . cr2 . reset ( ) ; NVIC :: mask ( Interrupt :: USART6 ) ; } , _ => unreachable ! ( ) } ; drop ( self ) ; }
Deacitivates the UART connection and destroys the struct, freeing the core and pins.
Deacitivates the UART connection and destroys the struct freeing the core and pins .
self
self