/*!
 * @file        user_tmr_config.c
 *
 * @brief       TMR Output Compare Inactive configuration
 *
 * @version     V1.0.0
 *
 * @date        2026-03-27
 *
 * @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).
 */

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

/** @addtogroup Examples
  @{
*/

/** @addtogroup TMR_Examples
@{
*/

/** @addtogroup TMR_OCInactive
  @{
*/

/** @defgroup TMR_OCInactive_Variables Variables
  @{
*/

Gpio_ConfigType g_tmr3_Ch1GpioConfig = {
    .pin = (uint16_t)TMR3_CH1_PIN,
    .mode = GPIO_MODE_AF,
    .outtype = GPIO_OUT_TYPE_PP,
    .speed = GPIO_SPEED_50MHz,
    .pupd = GPIO_PUPD_PU
};

Gpio_ConfigType g_tmr3_Ch2GpioConfig = {
    .pin = (uint16_t)TMR3_CH2_PIN,
    .mode = GPIO_MODE_AF,
    .outtype = GPIO_OUT_TYPE_PP,
    .speed = GPIO_SPEED_50MHz,
    .pupd = GPIO_PUPD_PU
};

Gpio_ConfigType g_tmr3_Ch3GpioConfig = {
    .pin = (uint16_t)TMR3_CH3_PIN,
    .mode = GPIO_MODE_AF,
    .outtype = GPIO_OUT_TYPE_PP,
    .speed = GPIO_SPEED_50MHz,
    .pupd = GPIO_PUPD_PU
};

Gpio_ConfigType g_tmr3_Ch4GpioConfig = {
    .pin = (uint16_t)TMR3_CH4_PIN,
    .mode = GPIO_MODE_AF,
    .outtype = GPIO_OUT_TYPE_PP,
    .speed = GPIO_SPEED_50MHz,
    .pupd = GPIO_PUPD_PU
};

Gpio_ConfigType g_gpioa_OutConfig = {
    .pin = (uint16_t)GPIOA_OUT_PIN,
    .mode = GPIO_MODE_OUT,
    .outtype = GPIO_OUT_TYPE_PP,
    .speed = GPIO_SPEED_50MHz,
    .pupd = GPIO_PUPD_PU
};

Tmr_TimeBaseType g_tmr3_BaseConfig = {
    .clockDivision = TMR_CKD_DIV1,
    .counterMode = TMR_COUNTER_MODE_UP,
    .div = 63,
    .period = 999
};

Tmr_OcConfigType g_tmr3_OC1Config = {
    .OC_Mode = TMR_OC_MODE_INACTIVE,
    .OC_OutputState = TMR_OUTPUT_STATE_ENABLE,
    .OC_Polarity = TMR_OC_POLARITY_HIGH,
    .Pulse = 800
};

Tmr_OcConfigType g_tmr3_OC2Config = {
    .OC_Mode = TMR_OC_MODE_INACTIVE,
    .OC_OutputState = TMR_OUTPUT_STATE_ENABLE,
    .OC_Polarity = TMR_OC_POLARITY_HIGH,
    .Pulse = 600
};

Tmr_OcConfigType g_tmr3_OC3Config = {
    .OC_Mode = TMR_OC_MODE_INACTIVE,
    .OC_OutputState = TMR_OUTPUT_STATE_ENABLE,
    .OC_Polarity = TMR_OC_POLARITY_HIGH,
    .Pulse = 400
};

Tmr_OcConfigType g_tmr3_OC4Config = {
    .OC_Mode = TMR_OC_MODE_INACTIVE,
    .OC_OutputState = TMR_OUTPUT_STATE_ENABLE,
    .OC_Polarity = TMR_OC_POLARITY_HIGH,
    .Pulse = 200
};

/**@} end of group TMR_OCInactive_Variables */
/**@} end of group TMR_OCInactive */
/**@} end of group TMR_Examples */
/**@} end of group Examples */
