2022-10-20 09:40:14 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2006-2022, RT-Thread Development Team
|
2022-07-13 19:56:14 +08:00
|
|
|
*
|
2022-10-20 09:40:14 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2022-07-13 19:56:14 +08:00
|
|
|
*
|
2022-10-20 09:40:14 +08:00
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2022-10-19 Nations first version
|
2022-07-13 19:56:14 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __DRV_ADC__
|
|
|
|
#define __DRV_ADC__
|
|
|
|
|
2022-10-20 09:40:14 +08:00
|
|
|
#include <rthw.h>
|
2022-07-13 19:56:14 +08:00
|
|
|
#include <rtthread.h>
|
|
|
|
#include <rtdevice.h>
|
2022-10-20 09:40:14 +08:00
|
|
|
#include <board.h>
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2022-07-13 19:56:14 +08:00
|
|
|
|
|
|
|
struct n32_adc_config
|
|
|
|
{
|
|
|
|
const char *name;
|
|
|
|
ADC_Module* adc_periph;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct n32_adc
|
|
|
|
{
|
|
|
|
struct rt_adc_device adc_device;
|
|
|
|
struct n32_adc_config *config;
|
|
|
|
};
|
|
|
|
|
|
|
|
int rt_hw_adc_init(void);
|
|
|
|
|
2022-10-20 09:40:14 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
2022-07-13 19:56:14 +08:00
|
|
|
#endif
|
2022-10-20 09:40:14 +08:00
|
|
|
|
|
|
|
#endif /* __DRV_ADC__ */
|