以下内容在stm32f4xx_gpio.h内
- /** @defgroup GPIO_Alternat_function_selection_define
- * @{
- */
- /**
- * @brief AF 0 selection
- */
- #define GPIO_AF_RTC_50Hz ((uint8_t)0x00) /* RTC_50Hz Alternate Function mapping */
- #define GPIO_AF_MCO ((uint8_t)0x00) /* MCO (MCO1 and MCO2) Alternate Function mapping */
- #define GPIO_AF_TAMPER ((uint8_t)0x00) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */
- #define GPIO_AF_SWJ ((uint8_t)0x00) /* SWJ (SWD and JTAG) Alternate Function mapping */
- #define GPIO_AF_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */
- #if defined (STM32F446xx)
- #define GPIO_AF0_TIM2 ((uint8_t)0x00) /* TIM2 Alternate Function mapping */
- #endif /* STM32F446xx */
- /**
- * @brief AF 1 selection
- */
- #define GPIO_AF_TIM1 ((uint8_t)0x01) /* TIM1 Alternate Function mapping */
- #define GPIO_AF_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */
- /**
- * @brief AF 2 selection
- */
- #define GPIO_AF_TIM3 ((uint8_t)0x02) /* TIM3 Alternate Function mapping */
- #define GPIO_AF_TIM4 ((uint8_t)0x02) /* TIM4 Alternate Function mapping */
- #define GPIO_AF_TIM5 ((uint8_t)0x02) /* TIM5 Alternate Function mapping */
- /**
- * @brief AF 3 selection
- */
- #define GPIO_AF_TIM8 ((uint8_t)0x03) /* TIM8 Alternate Function mapping */
- #define GPIO_AF_TIM9 ((uint8_t)0x03) /* TIM9 Alternate Function mapping */
- #define GPIO_AF_TIM10 ((uint8_t)0x03) /* TIM10 Alternate Function mapping */
- #define GPIO_AF_TIM11 ((uint8_t)0x03) /* TIM11 Alternate Function mapping */
- #if defined (STM32F446xx)
- #define GPIO_AF3_CEC ((uint8_t)0x03) /* CEC Alternate Function mapping */
- #endif /* STM32F446xx */
- /**
- * @brief AF 4 selection
- */
- #define GPIO_AF_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */
- #define GPIO_AF_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */
- #define GPIO_AF_I2C3 ((uint8_t)0x04) /* I2C3 Alternate Function mapping */