summaryrefslogtreecommitdiff
path: root/bsp/ti/c28x/libraries/HAL_Drivers/drv_adc.h
blob: 7cbd14bbfeabc544d990f7f13d14f8f9d5eddc8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
 * Copyright (c) 2006-2022, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2022-10-07     qiyu         first version
 */

#ifndef DRIVERS_DRV_ADC_H_
#define DRIVERS_DRV_ADC_H_
#ifdef BSP_ADC_USING_12BIT
#define ADC_RESOLUTION ADC_RESOLUTION_12BIT
#else
#define ADC_RESOLUTION ADC_RESOLUTION_16BIT
#endif
#include "rtdevice.h"
#ifdef BSP_USING_ADC

struct c28x_adc
{
    struct rt_adc_device c28x_adc_device;
    volatile struct ADC_REGS *adc_regs;
    volatile struct ADC_RESULT_REGS *adc_results;
    const char *name;
};
#endif /* BSP_USING_ADC */

#endif /* DRIVERS_DRV_ADC_H_ */