/*!
 * @file        user_adc_config.c
 *
 * @brief       ADC 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_adc_config.h"

/** @addtogroup Examples
  @{
  */

/** @addtogroup ADC_Examples
  @{
  */

/** @addtogroup ADC_ContinuousConversion
  @{
*/

/** @defgroup ADC_ContinuousConversion_Variables Variables
  @{
*/

/* Configure gpio pin */
Gpio_ConfigType gpioConfig = {
    .pin        = (uint16_t)GPIO_PIN_1,
    .mode       = GPIO_MODE_AN,
    .outtype    = GPIO_OUT_TYPE_PP,
    .speed      = GPIO_SPEED_10MHz,
    .pupd       = GPIO_PUPD_NO,
};

/* Configure adc */
Adc_ConfigType adcConfig = {
    /* Set resolution*/
    .resolution            = ADC_RESOLUTION_12B,
    /* Set scanDir*/
    .scanDir               = ADC_SCAN_DIR_UPWARD,
    /* Set convMode continous*/
    .convMode              = ADC_CONVERSION_CONTINUOUS,
    /* Set dataAlign*/
    .dataAlign             = ADC_DATA_ALIGN_RIGHT,
    /* Set extTrigEdge*/
    .extTrigEdge           = ADC_EXT_TRIG_EDGE_NONE,
    /* Set extTrigConv*/
    .extTrigConv           = ADC_EXT_TRIG_CONV_TRG0,
};

/**@} end of group ADC_ContinuousConversion_Variables */
/**@} end of group ADC_ContinuousConversion */
/**@} end of group ADC_Examples */
/**@} end of group Examples */
