stm32f469_fw/src/hw/driver/ts.c
err_code_t drvTsExtiConfig(void)
{
  err_code_t ts_status = OK;
  GPIO_InitTypeDef GPIO_InitStruct;

  /* Msp Init of GPIO used for TS_INT pin coming from TouchScreen driver IC FT6x06 */
  /* When touchscreen is operated in interrupt mode */
  drvTsMspInit();

  /* Configure Interrupt mode for TS_INT pin falling edge : when a new touch is available */
  /* TS_INT pin is active on low level on new touch available */
  GPIO_InitStruct.Pin = GPIO_PIN_5;
  GPIO_InitStruct.Pull = GPIO_PULLUP;
  GPIO_InitStruct.Speed = GPIO_SPEED_FAST;
  GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
  HAL_GPIO_Init(GPIOJ, &GPIO_InitStruct);

  /* Enable and set the TS_INT EXTI Interrupt to an intermediate priority */
  HAL_NVIC_SetPriority((IRQn_Type)(EXTI9_5_IRQn), 0x05, 0x00);
  HAL_NVIC_EnableIRQ((IRQn_Type)(EXTI9_5_IRQn));

  /* Enable the TS in interrupt mode */
  /* In that case the INT output of FT6206 when new touch is available */
  /* is active on low level and directed on EXTI */
  ts_driver->EnableIT(i2c_addr);

  return (ts_status);
}
/**
  * @brief  Configures and enables the touch screen interrupts both at GPIO level and
  * in TouchScreen IC driver configuration.
  * @retval OK if all initializations are OK.
  */
@brief  Configures and enables the touch screen interrupts both at GPIO level and
in TouchScreen IC driver configuration.
@retval OK if all initializations are OK.
@brief Configures and enables the touch screen interrupts both at GPIO level and in TouchScreen IC driver configuration . @retval OK if all initializations are OK .
err_code_t drvTsExtiConfig(void)
{
  err_code_t ts_status = OK;
  GPIO_InitTypeDef GPIO_InitStruct;
  drvTsMspInit();
  GPIO_InitStruct.Pin = GPIO_PIN_5;
  GPIO_InitStruct.Pull = GPIO_PULLUP;
  GPIO_InitStruct.Speed = GPIO_SPEED_FAST;
  GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
  HAL_GPIO_Init(GPIOJ, &GPIO_InitStruct);
  HAL_NVIC_SetPriority((IRQn_Type)(EXTI9_5_IRQn), 0x05, 0x00);
  HAL_NVIC_EnableIRQ((IRQn_Type)(EXTI9_5_IRQn));
  ts_driver->EnableIT(i2c_addr);
  return (ts_status);
}
err_code_t drvTsExtiConfig ( void ) { err_code_t ts_status = OK ; GPIO_InitTypeDef GPIO_InitStruct ; drvTsMspInit ( ) ; GPIO_InitStruct . Pin = GPIO_PIN_5 ; GPIO_InitStruct . Pull = GPIO_PULLUP ; GPIO_InitStruct . Speed = GPIO_SPEED_FAST ; GPIO_InitStruct . Mode = GPIO_MODE_IT_FALLING ; HAL_GPIO_Init ( GPIOJ , & GPIO_InitStruct ) ; HAL_NVIC_SetPriority ( ( IRQn_Type ) ( EXTI9_5_IRQn ) , 0x05 , 0x00 ) ; HAL_NVIC_EnableIRQ ( ( IRQn_Type ) ( EXTI9_5_IRQn ) ) ; ts_driver -> EnableIT ( i2c_addr ) ; return ( ts_status ) ; }
@brief  Configures and enables the touch screen interrupts both at GPIO level and
 in TouchScreen IC driver configuration.
@brief Configures and enables the touch screen interrupts both at GPIO level and in TouchScreen IC driver configuration .
/* Msp Init of GPIO used for TS_INT pin coming from TouchScreen driver IC FT6x06 */ /* When touchscreen is operated in interrupt mode */ /* Configure Interrupt mode for TS_INT pin falling edge : when a new touch is available */ /* TS_INT pin is active on low level on new touch available */ /* Enable and set the TS_INT EXTI Interrupt to an intermediate priority */ /* Enable the TS in interrupt mode */ /* In that case the INT output of FT6206 when new touch is available */ /* is active on low level and directed on EXTI */