STM32F37 Standard Peripheral bibliotheek  1.0
ST Microelectronics bibliotheek documentatie voor de STM32F37 Standard Peripheral Library
 All Data Structures Files Functions Variables Enumerations Enumerator Groups
GPIO Alternate functions configuration functions

GPIO Alternate functions configuration functions. More...

Functions

void GPIO_PinAFConfig (GPIO_TypeDef *GPIOx, uint16_t GPIO_PinSource, uint8_t GPIO_AF)
 Writes data to the specified GPIO data port. More...
 

Detailed Description

GPIO Alternate functions configuration functions.

 ===============================================================================
          ##### GPIO Alternate functions configuration functions #####
 ===============================================================================  

Function Documentation

void GPIO_PinAFConfig ( GPIO_TypeDef *  GPIOx,
uint16_t  GPIO_PinSource,
uint8_t  GPIO_AF 
)

Writes data to the specified GPIO data port.

Parameters
GPIOx,:where x can be (A, B, C, D, E or F) to select the GPIO peripheral.
GPIO_PinSource,:specifies the pin for the Alternate function. This parameter can be GPIO_PinSourcex where x can be (0..15).
GPIO_AF,:selects the pin to be used as Alternate function. This parameter can be one of the following value:
  • GPIO_AF_0: MCO, JTMS-SWDAT, JTCK-SWCLK, JTDI,JTDO, JTRST, TRACECLK, TRACED, TRACEWO.
  • GPIO_AF_1: TIM2, TIM15, TIM16, TIM17, OUT.
  • GPIO_AF_2: TIM3, TIM4, TIM5, TIM13, TIM14, TIM19.
  • GPIO_AF_3: Touch Sence.
  • GPIO_AF_4: I2C1, I2C2.
  • GPIO_AF_5: SPI1, SPI2, IR_OUT.
  • GPIO_AF_6: SPI1, SPI3, CEC, IR_OUT.
  • GPIO_AF_7: USART1, USART2, USART3, CAN, CEC.
  • GPIO_AF_8: COMP1_OUT, COMP2_OUT.
  • GPIO_AF_9: CAN, TIM12, TIM13, TIM14, TIM15.
  • GPIO_AF_10: TIM2, TIM3, TIM4, TIM12, TIM17.
  • GPIO_AF_11: TIM19.
  • GPIO_AF_14: USBDM, USBDP.
  • GPIO_AF_15: OUT.
Note
The pin should already been configured in Alternate Function mode(AF) using GPIO_InitStruct->GPIO_Mode = GPIO_Mode_AF
Refer to the Alternate function mapping table in the device datasheet for the detailed mapping of the system and peripherals'alternate function I/O pins.
Return values
None