/*!
 * @file        user_eint_config.c
 *
 * @brief       EINT configurations
 *
 * @version     V1.0.0
 *
 * @date        2026-03-25
 *
 * @attention
 *
 *  Copyright (C) 2026 Geehy Semiconductor
 *
 *  You may not use this file except in compliance with the
 *  GEEHY COPYRIGHT NOTICE (Geehy Semiconductor Software License Agreement).
 *
 *  The program is only for reference, which is distributed in the hope
 *  that it will be useful and instructional for customers to develop
 *  their software. Unless required by applicable law or agreed to in
 *  writing, the program is distributed on an "AS IS" BASIS, WITHOUT
 *  ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the Geehy Semiconductor Software License Agreement for the governing permissions
 *  and limitations under the License.
 */

/* Includes */
#include "user_eint_config.h"

/** @addtogroup Examples
  @{
  */

/** @addtogroup EINT_Examples
  @{
  */

/** @addtogroup EINT_Driver
  @{
*/

/** @defgroup EINT_Variables
  @{
*/

/* Configure key1 pin as input floating */
Gpio_ConfigType gpioConfigKey1 = {
    .pin        = (uint16_t)KEY1_BUTTON_PIN,
    .mode       = GPIO_MODE_IN,
    .outtype    = GPIO_OUT_TYPE_PP,
    .speed      = GPIO_SPEED_50MHz,
    .pupd       = GPIO_PUPD_PU,
};

/* Configure key2 pin as input floating */
Gpio_ConfigType gpioConfigKey2 = {
    .pin        = (uint16_t)KEY2_BUTTON_PIN,
    .mode       = GPIO_MODE_IN,
    .outtype    = GPIO_OUT_TYPE_PP,
    .speed      = GPIO_SPEED_50MHz,
    .pupd       = GPIO_PUPD_PU,
};

/* Configure key1 exit line */
Eint_ConfigType eintConfigKey1 = {
    .line    =  (uint32_t)KEY1_BUTTON_EXTI_LINE,
    .lineCmd =  ENABLE,
    .mode    =  EINT_MODE_INTERRUPT,
    .trigger =  EINT_TRIGGER_FALLING,
};

/* Configure key2 exit line */
Eint_ConfigType eintConfigKey2 = {
    .line    =  (uint32_t)KEY2_BUTTON_EXTI_LINE,
    .lineCmd =  ENABLE,
    .mode    =  EINT_MODE_INTERRUPT,
    .trigger =  EINT_TRIGGER_FALLING,
};

/**@} end of group EINT_Variables */
/**@} end of group EINT_Driver */
/**@} end of group EINT_Examples */
/**@} end of group Examples */
