/** * @file HW_ADC_ATY.h * * @param Project DEVICE_GENERAL_ATY_LIB * * @author ATY * * @copyright * - Copyright 2017 - 2026 MZ-ATY * - This code follows: * - MZ-ATY Various Contents Joint Statement - * * https://mengze.top/MZ-ATY_VCJS * - CC 4.0 BY-NC-SA - * * https://creativecommons.org/licenses/by-nc-sa/4.0/ * - Your use will be deemed to have accepted the terms of this statement. * * @brief functions of adc for STC51 and STM32F with HAL lib * * @version * - 1_01_221231 > ATY * -# Preliminary version, first Release ******************************************************************************** */ #ifndef __HW_ADC_ATY_H #define __HW_ADC_ATY_H #include "INCLUDE_ATY.h" /******************************* For user *************************************/ /******************************************************************************/ #if (__ATY_IS_8051_COMPILER) void ADC_Init(void); float ADC_GetVref(void); uint16_t ADC_Get(uint8_t channel); #elif defined(USE_HAL_DRIVER) uint16_t ADC_Get(ADC_HandleTypeDef* adc, uint32_t channel); #endif /* PLATFORM */ #endif /* __HW_ADC_ATY_H */ /******************************** End Of File *********************************/