fn find_channel(pin: u8) -> i8 {
    for (i, ch) in GPIOTE().config.iter().enumerate() {
        if (ch.get() >> 8) & 0x1F == pin as u32 {
            return i as i8;
        }
    }
    return -1;
}
/// Return which channel is allocated to a pin, or -1 if none.
Return which channel is allocated to a pin, or -1 if none.
Return which channel is allocated to a pin or - 1 if none .
fn find_channel(pin: u8) -> i8 {
    for (i, ch) in GPIOTE().config.iter().enumerate() {
        if (ch.get() >> 8) & 0x1F == pin as u32 {
            return i as i8;
        }
    }
    return -1;
}
fn find_channel ( pin : u8 ) -> i8 { for ( i , ch ) in GPIOTE ( ) . config . iter ( ) . enumerate ( ) { if ( ch . get ( ) >> 8 ) & 0x1F == pin as u32 { return i as i8 ; } } return - 1 ; }
Return which channel is allocated to a pin, or -1 if none.
Return which channel is allocated to a pin or - 1 if none .
pin
u8
pin
u8