/*!
 * @file        user_tmr_config.h
 *
 * @brief       TMR configurations
 *
 * @version     V1.0.0
 *
 * @date        2026-03-26
 *
 * @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 in 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.
 */

#ifndef USER_TMR_CONFIG_H
#define USER_TMR_CONFIG_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes */
#include "g32a10xx.h"
#include "g32a10xx_gpio.h"
#include "g32a10xx_tmr.h"
#include "g32a10xx_misc.h"

/** @addtogroup Examples
  @{
*/

/** @addtogroup TMR_Examples
@{
*/

/** @addtogroup TMR_EdgeDetection
  @{
*/

/** @defgroup TMR_EdgeDetection_Macros Macros
  @{
*/

/* TMR1 Channel3 GPIO Port definition */
#define TMR1_CH3_GPIO_PORT           GPIOA
#define TMR1_CH3_PIN                 GPIO_PIN_10
#define TMR1_CH3_PIN_SOURCE          GPIO_PIN_SOURCE_10
#define TMR1_CH3_GPIO_AF             GPIO_AF_PIN2

/* TMR1 Channel4 GPIO Port definition */
#define TMR1_CH4_GPIO_PORT           GPIOA
#define TMR1_CH4_PIN                 GPIO_PIN_11
#define TMR1_CH4_PIN_SOURCE          GPIO_PIN_SOURCE_11
#define TMR1_CH4_GPIO_AF             GPIO_AF_PIN2

/**@} end of group TMR_EdgeDetection_Macros */

/** @defgroup TMR_EdgeDetection_Variables Variables
  @{
*/

/* TMR1 CH3 GPIO configuration */
extern Gpio_ConfigType    g_tmrGpioConfig_CH3;

/* TMR1 CH4 GPIO configuration */
extern Gpio_ConfigType    g_tmrGpioConfig_CH4;

/* TMR1 base timer configuration */
extern Tmr_TimeBaseType g_tmrBaseConfig;

/* TMR1 Channel3 input capture configuration */
extern Tmr_IcConfigType g_tmrIc3Config;

/* TMR1 Channel4 input capture configuration */
extern Tmr_IcConfigType g_tmrIc4Config;

/**@} end of group TMR_EdgeDetection_Variables */

/**@} end of group TMR_EdgeDetection */
/**@} end of group TMR_Examples */
/**@} end of group Examples */

#ifdef __cplusplus
}
#endif

#endif /* USER_TMR_CONFIG_H */
