Yeah, I did it like you said.
But the code can not distinguish between rising and falling edges.
Here is the code:
void HAL_GPIO_EXTI_Callback (uint16_t GPIO_Pin)
{
if (GPIO_PIN_SET! = HAL_GPIO_ReadPin (GPIOA, GPIO_PIN_11))
{// THIS CONNECTION IS ADDED. THEN THE SET TUSUNA CAN BE PERFORMED UP AND UP DOWN PRIOR.
if (GPIO_Pin == GPIO_PIN_4) // PA4 rising edge or falling edge cut.
{// Let's say the LCD is inverted. DOWN.
// if ((GPIO_PIN_RESET == HAL_GPIO_ReadPin (GPIOA, GPIO_PIN_5)) && (GPIO_PIN_SET == HAL_GPIO_ReadPin (GPIOA, GPIO_PIN_4)))
// {
// A UCU
if ((GPIO_PIN_RESET == HAL_GPIO_ReadPin (GPIOA, GPIO_PIN_5)) && (GPIO_PIN_SET == HAL_GPIO_ReadPin (GPIOA, GPIO_PIN_4))) // While rising edge on PA4.
{
//tsHandle.tsButtonVariables.bButton_A_DusenKenar_B_Logic0 = 0;
tsHandle.tsButtonVariables.bButton_A_YukselenKenar_B_Logic0 = 1;
//tsHandle.tsButtonVariables.bButton_B_DusenKenar_A_Logic0 = 0;
//tsHandle.tsButtonVariables.bButton_B_UpdateKenar_A_Logic0 = 0;
}
else if ((GPIO_PIN_RESET == HAL_GPIO_ReadPin (GPIOA, GPIO_PIN_5)) && (GPIO_PIN_RESET == HAL_GPIO_ReadPin (GPIOA, GPIO_PIN_4))) // PA4 when the falling edge is occurring.
{
tsHandle.tsButtonVariables.bButton_A_DusenKenar_B_Logic0 = 1;
//tsHandle.tsButtonVariables.bButton_A_YukselenKenar_B_Logic0 = 0;
//tsHandle.tsButtonVariables.bButton_B_DusenKenar_A_Logic0 = 0;
//tsHandle.tsButtonVariables.bButton_B_UpdateKenar_A_Logic0 = 0;
}
else
{
}
}