1 /*! 2 * \file adc-board.h 3 * 4 * \brief Target board ADC driver implementation 5 * 6 * \copyright Revised BSD License, see section \ref LICENSE. 7 * 8 * \code 9 * ______ _ 10 * / _____) _ | | 11 * ( (____ _____ ____ _| |_ _____ ____| |__ 12 * \____ \| ___ | (_ _) ___ |/ ___) _ \ 13 * _____) ) ____| | | || |_| ____( (___| | | | 14 * (______/|_____)_|_|_| \__)_____)\____)_| |_| 15 * (C)2013-2017 Semtech 16 * 17 * \endcode 18 * 19 * \author Miguel Luis ( Semtech ) 20 * 21 * \author Gregory Cristian ( Semtech ) 22 */ 23 #ifndef __ADC_BOARD_H__ 24 #define __ADC_BOARD_H__ 25 26 #ifdef __cplusplus 27 extern "C" 28 { 29 #endif 30 31 #include "adc.h" 32 33 /*! 34 * \brief Initializes the ADC object and MCU peripheral 35 * 36 * \param [IN] obj ADC object 37 * \param [IN] adcInput ADC input pin 38 */ 39 void AdcMcuInit( Adc_t *obj, PinNames adcInput ); 40 41 /*! 42 * \brief Initializes the ADC internal parameters 43 */ 44 void AdcMcuConfig( void ); 45 46 /*! 47 * \brief Reads the value of the given channel 48 * 49 * \param [IN] obj ADC object 50 * \param [IN] channel ADC input channel 51 */ 52 uint16_t AdcMcuReadChannel( Adc_t *obj, uint32_t channel ); 53 54 #ifdef __cplusplus 55 } 56 #endif 57 58 #endif // __ADC_BOARD_H__ 59