/*
 * Copyright 2020-2026 Yuntu Microelectronics Co., Ltd.
 * All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 * 
 * @file adc_config.c
 * @brief 
 * 
 */


#include "adc_config.h"



/* adc_config_int */
const adc_converter_config_t adc_config_int={
    .clockDivider=0,
    .startTime=48,
    .sampleTime=2,
    .overrunMode=false,
    .autoOffEnable=false,
    .waitEnable=false,
    .trigger=ADC_TRIGGER_HARDWARE,
    .align=ADC_ALIGN_RIGHT,
    .resolution=ADC_RESOLUTION_12BIT,
    .dmaWaterMark=3,
    .dmaEnable=false,
    .sequenceConfig={
        .sequenceMode=ADC_CONV_STEP,
        .sequenceIntEnable=true,
        .convIntEnable=true,
        .readyIntEnable=false,
        .ovrunIntEnable=false,
        .sampIntEnable=false,
        .channels={
            ADC_INPUTCHAN_EXT0,
            ADC_INPUTCHAN_EXT1,
            ADC_INPUTCHAN_EXT2,
        },
        .totalChannels=3,
    },
    .compareConfig={
        .compareEnable=false,
        .compareAllChannelEnable=false,

        .compHigh=4095,
        .compLow=0,
        .compIntEnable=false,
    },
};


/* adc_config_dma */
const adc_converter_config_t adc_config_dma={
    .clockDivider=0,
    .startTime=48,
    .sampleTime=2,
    .overrunMode=false,
    .autoOffEnable=false,
    .waitEnable=false,
    .trigger=ADC_TRIGGER_HARDWARE,
    .align=ADC_ALIGN_RIGHT,
    .resolution=ADC_RESOLUTION_12BIT,
    .dmaWaterMark=2,
    .dmaEnable=true,
    .sequenceConfig={
        .sequenceMode=ADC_CONV_LOOP,
        .sequenceIntEnable=false,
        .convIntEnable=false,
        .readyIntEnable=false,
        .ovrunIntEnable=false,
        .sampIntEnable=false,
        .channels={
            ADC_INPUTCHAN_EXT0,
            ADC_INPUTCHAN_EXT1,
            ADC_INPUTCHAN_EXT2,
        },
        .totalChannels=3,
    },
    .compareConfig={
        .compareEnable=false,
        .compareAllChannelEnable=false,

        .compHigh=4095,
        .compLow=0,
        .compIntEnable=false,
    },
};


