* Copyright (c) 2021 Huawei Device Co., Ltd.
*
* HDF is dual licensed: you can use it either under the terms of
* the GPL, or the BSD license, at your option.
* See the LICENSE file in the root of this repository for complete details.
*/
#ifndef ADC_IF_H
#define ADC_IF_H
#include "platform_if.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif
struct AdcIoMsg {
uint32_t number;
uint32_t channel;
};
DevHandle AdcOpen(uint32_t number);
void AdcClose(DevHandle handle);
int32_t AdcRead(DevHandle handle, uint32_t channel, uint32_t *val);
* @brief Enumerates ADC I/O commands.
*
* @since 1.0
*/
enum AdcIoCmd {
ADC_IO_READ = 0,
ADC_IO_OPEN,
ADC_IO_CLOSE,
};
#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif
#endif