1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 21:05:35 +03:00

STM32F4: Library update

This commit is contained in:
blckmn 2016-06-21 13:53:14 +10:00
parent 5d385d0019
commit bca73007d6
179 changed files with 5024 additions and 32738 deletions

View file

@ -2,14 +2,14 @@
******************************************************************************
* @file stm32f4xx_gpio.h
* @author MCD Application Team
* @version V1.6.1
* @date 21-October-2015
* @version V1.7.1
* @date 20-May-2016
* @brief This file contains all the functions prototypes for the GPIO firmware
* library.
******************************************************************************
* @attention
*
* <h2><center>&copy; COPYRIGHT 2015 STMicroelectronics</center></h2>
* <h2><center>&copy; COPYRIGHT 2016 STMicroelectronics</center></h2>
*
* Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
* You may not use this file except in compliance with the License.
@ -286,7 +286,7 @@ typedef struct
#if defined(STM32F446xx)
#define GPIO_AF4_CEC ((uint8_t)0x04) /* CEC Alternate Function mapping */
#endif /* STM32F446xx */
#if defined(STM32F410xx) || defined(STM32F446xx)
#if defined(STM32F410xx) || defined(STM32F412xG) || defined(STM32F446xx)
#define GPIO_AF_FMPI2C ((uint8_t)0x04) /* FMPI2C Alternate Function mapping */
#endif /* STM32F410xx || STM32F446xx */
@ -309,6 +309,10 @@ typedef struct
#define GPIO_AF6_SPI4 ((uint8_t)0x06) /* SPI4 Alternate Function mapping (Only for STM32F411xE Devices) */
#define GPIO_AF6_SPI5 ((uint8_t)0x06) /* SPI5 Alternate Function mapping (Only for STM32F410xx/STM32F411xE Devices) */
#define GPIO_AF_SAI1 ((uint8_t)0x06) /* SAI1 Alternate Function mapping */
#define GPIO_AF_I2S2ext ((uint8_t)0x06) /* I2S2ext_SD Alternate Function mapping (only for STM32F412xG Devices) */
#if defined(STM32F412xG)
#define GPIO_AF6_DFSDM1 ((uint8_t)0x06) /* DFSDM Alternate Function mapping */
#endif /* STM32F412xG */
/**
* @brief AF 7 selection
@ -331,6 +335,11 @@ typedef struct
#define GPIO_AF_USART6 ((uint8_t)0x08) /* USART6 Alternate Function mapping */
#define GPIO_AF_UART7 ((uint8_t)0x08) /* UART7 Alternate Function mapping */
#define GPIO_AF_UART8 ((uint8_t)0x08) /* UART8 Alternate Function mapping */
#if defined(STM32F412xG)
#define GPIO_AF8_USART3 ((uint8_t)0x08) /* USART3 Alternate Function mapping */
#define GPIO_AF8_DFSDM1 ((uint8_t)0x08) /* DFSDM Alternate Function mapping */
#define GPIO_AF8_CAN1 ((uint8_t)0x08) /* CAN1 Alternate Function mapping */
#endif /* STM32F412xG */
#if defined(STM32F446xx)
#define GPIO_AF8_SAI2 ((uint8_t)0x08) /* SAI2 Alternate Function mapping */
#define GPIO_AF_SPDIF ((uint8_t)0x08) /* SPDIF Alternate Function mapping */
@ -344,18 +353,18 @@ typedef struct
#define GPIO_AF_TIM12 ((uint8_t)0x09) /* TIM12 Alternate Function mapping */
#define GPIO_AF_TIM13 ((uint8_t)0x09) /* TIM13 Alternate Function mapping */
#define GPIO_AF_TIM14 ((uint8_t)0x09) /* TIM14 Alternate Function mapping */
#define GPIO_AF9_I2C2 ((uint8_t)0x09) /* I2C2 Alternate Function mapping (Only for STM32F401xx/STM32F410xx/STM32F411xE Devices) */
#define GPIO_AF9_I2C3 ((uint8_t)0x09) /* I2C3 Alternate Function mapping (Only for STM32F401xx/STM32F411xE Devices) */
#define GPIO_AF9_I2C2 ((uint8_t)0x09) /* I2C2 Alternate Function mapping (Only for STM32F401xx/STM32F410xx/STM32F411xE/STM32F412xG Devices) */
#define GPIO_AF9_I2C3 ((uint8_t)0x09) /* I2C3 Alternate Function mapping (Only for STM32F401xx/STM32F411xE/STM32F412xG Devices) */
#if defined(STM32F446xx)
#define GPIO_AF9_SAI2 ((uint8_t)0x09) /* SAI2 Alternate Function mapping */
#endif /* STM32F446xx */
#define GPIO_AF9_LTDC ((uint8_t)0x09) /* LTDC Alternate Function mapping */
#if defined(STM32F446xx) || defined(STM32F469_479xx)
#if defined(STM32F412xG) || defined(STM32F446xx) || defined(STM32F469_479xx)
#define GPIO_AF9_QUADSPI ((uint8_t)0x09) /* QuadSPI Alternate Function mapping */
#endif /* STM32F446xx || STM32F469_479xx */
#if defined(STM32F410xx)
#endif /* STM32F412xG || STM32F446xx || STM32F469_479xx */
#if defined(STM32F410xx) || defined(STM32F412xG)
#define GPIO_AF9_FMPI2C ((uint8_t)0x09) /* FMPI2C Alternate Function mapping (Only for STM32F410xx Devices) */
#endif /* STM32F410xx */
#endif /* STM32F410xx || STM32F412xG */
/**
* @brief AF 10 selection
@ -365,9 +374,13 @@ typedef struct
#if defined(STM32F446xx)
#define GPIO_AF10_SAI2 ((uint8_t)0x0A) /* SAI2 Alternate Function mapping */
#endif /* STM32F446xx */
#if defined(STM32F446xx) || defined(STM32F469_479xx)
#if defined(STM32F412xG) || defined(STM32F446xx) || defined(STM32F469_479xx)
#define GPIO_AF10_QUADSPI ((uint8_t)0x0A) /* QuadSPI Alternate Function mapping */
#endif /* STM32F446xx || STM32F469_479xx */
#endif /* STM32F412xG || STM32F446xx || STM32F469_479xx */
#if defined(STM32F412xG)
#define GPIO_AF10_FMC ((uint8_t)0xA) /* FMC Alternate Function mapping */
#define GPIO_AF10_DFSDM ((uint8_t)0xA) /* DFSDM Alternate Function mapping */
#endif /* STM32F412xG */
/**
* @brief AF 11 selection
*/
@ -376,9 +389,9 @@ typedef struct
/**
* @brief AF 12 selection
*/
#if defined(STM32F40_41xxx)
#if defined(STM32F40_41xxx) || defined(STM32F412xG)
#define GPIO_AF_FSMC ((uint8_t)0xC) /* FSMC Alternate Function mapping */
#endif /* STM32F40_41xxx */
#endif /* STM32F40_41xxx || STM32F412xG */
#if defined(STM32F427_437xx) || defined(STM32F429_439xx) || defined(STM32F446xx) || defined(STM32F469_479xx)
#define GPIO_AF_FMC ((uint8_t)0xC) /* FMC Alternate Function mapping */
@ -475,6 +488,10 @@ typedef struct
((AF) == GPIO_AF_LTDC))
#endif /* STM32F427_437xx || STM32F429_439xx */
#if defined(STM32F412xG)
#define IS_GPIO_AF(AF) (((AF) < 16) && ((AF) != 11) && ((AF) != 14))
#endif /* STM32F412xG */
#if defined(STM32F446xx)
#define IS_GPIO_AF(AF) (((AF) < 16) && ((AF) != 11) && ((AF) != 14))
#endif /* STM32F446xx */