ports/stm32/pin_defs_stm32.c
uint32_t pin_get_af(const pin_obj_t *pin) {
#if !defined(MCU_SERIES_F1)
    return (pin->gpio->AFR[pin->pin >> 3] >> ((pin->pin & 7) * 4)) & 0xf;
#else
    return 0;
#endif
}
// Returns the af (alternate function) index currently set for a pin.
Returns the af (alternate function) index currently set for a pin.
Returns the af ( alternate function ) index currently set for a pin .
uint32_t pin_get_af(const pin_obj_t *pin) {
#if !defined(MCU_SERIES_F1)
    return (pin->gpio->AFR[pin->pin >> 3] >> ((pin->pin & 7) * 4)) & 0xf;
#else
    return 0;
#endif
}
uint32_t pin_get_af ( const pin_obj_t * pin ) { #if ! defined ( MCU_SERIES_F1 ) return ( pin -> gpio -> AFR [ pin -> pin >> 3 ] >> ( ( pin -> pin & 7 ) * 4 ) ) & 0xf ; #else return 0 ; #endif }
Returns the af (alternate function) index currently set for a pin.
Returns the af ( alternate function ) index currently set for a pin .