pub fn into_alternate<const A: u8>(self) -> Pin<Alternate<A>, P, N> {
        #[allow(path_statements, clippy::no_effect)]
        {
            Assert::<A, 16>::LESS;
        }
        let offset = 2 * { N };
        let offset2 = 4 * { N };
        let mode = A as u32;
        unsafe {
            if offset2 < 32 {
                (*Gpio::<P>::ptr())
                    .afrl
                    .modify(|r, w| w.bits((r.bits() & !(0b1111 << offset2)) | (mode << offset2)));
            } else {
                let offset2 = offset2 - 32;
                (*Gpio::<P>::ptr())
                    .afrh
                    .modify(|r, w| w.bits((r.bits() & !(0b1111 << offset2)) | (mode << offset2)));
            }
            (*Gpio::<P>::ptr())
                .moder
                .modify(|r, w| w.bits((r.bits() & !(0b11 << offset)) | (0b10 << offset)));
        }
        Pin::new()
    }
/// Configures the pin to operate alternate mode
Configures the pin to operate alternate mode
Configures the pin to operate alternate mode
pub fn into_alternate<const A: u8>(self) -> Pin<Alternate<A>, P, N> {
        #[allow(path_statements, clippy::no_effect)]
        {
            Assert::<A, 16>::LESS;
        }
        let offset = 2 * { N };
        let offset2 = 4 * { N };
        let mode = A as u32;
        unsafe {
            if offset2 < 32 {
                (*Gpio::<P>::ptr())
                    .afrl
                    .modify(|r, w| w.bits((r.bits() & !(0b1111 << offset2)) | (mode << offset2)));
            } else {
                let offset2 = offset2 - 32;
                (*Gpio::<P>::ptr())
                    .afrh
                    .modify(|r, w| w.bits((r.bits() & !(0b1111 << offset2)) | (mode << offset2)));
            }
            (*Gpio::<P>::ptr())
                .moder
                .modify(|r, w| w.bits((r.bits() & !(0b11 << offset)) | (0b10 << offset)));
        }
        Pin::new()
    }
pub fn into_alternate < const A : u8 > ( self ) -> Pin < Alternate < A > , P , N > { # [ allow ( path_statements clippy no_effect ) ] { Assert :: < A , 16 > :: LESS ; } let offset = 2 * { N } ; let offset2 = 4 * { N } ; let mode = A as u32 ; unsafe { if offset2 < 32 { ( * Gpio :: < P > :: ptr ( ) ) . afrl . modify ( | r , w | w . bits ( ( r . bits ( ) & ! ( 0b1111 << offset2 ) ) | ( mode << offset2 ) ) ) ; } else { let offset2 = offset2 - 32 ; ( * Gpio :: < P > :: ptr ( ) ) . afrh . modify ( | r , w | w . bits ( ( r . bits ( ) & ! ( 0b1111 << offset2 ) ) | ( mode << offset2 ) ) ) ; } ( * Gpio :: < P > :: ptr ( ) ) . moder . modify ( | r , w | w . bits ( ( r . bits ( ) & ! ( 0b11 << offset ) ) | ( 0b10 << offset ) ) ) ; } Pin :: new ( ) }
Configures the pin to operate alternate mode
Configures the pin to operate alternate mode
self
self