Analog_Signals.h 1.9 KB
Newer Older
hu's avatar
hu committed
1 2 3 4 5 6
/**************************************************************************//**
  * \file      Analog_Signals.h
  * \brief     Analog signal processing
  * \attention
  *
  * This file is automatically generated by analog signals configuration tool.
7
  * Date         : 2021/11/25 15:48:30
hu's avatar
hu committed
8
  * Cfg Tool Ver : 1.1.0
9
  * Engineer     : 
hu's avatar
hu committed
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
  * (c) Heilongjiang TYW electronics co., LTD
  *
******************************************************************************/

#ifndef ANALOG_SIGNALS_H__
#define ANALOG_SIGNALS_H__

/* Includes -----------------------------------------------------------------*/
#include "ADC.h"
#include "Analog_Circuits.h"

/* C binding of definitions if building with C++ compiler */
#ifdef __cplusplus
extern  {
#endif
/*! @{ */

/* Exported types ------------------------------------------------------------*/
enum ADCChName
{
    ADC_CH_KL30_VOLTAGE = 0,
    ADC_CH_PRIMARY_AIR_VOLTAGE,
    ADC_CH_SECONDARY_AIR_VOLTAGE,
    ADC_CH_FUEL_REF_VOLTAGE,
    ADC_CH_FUEL_R,
35
    ADC_CH_WETAIR_VOLTAGE,
hu's avatar
hu committed
36 37 38 39 40
    ADC_CH_KEY,
    ADC_CH_NTC_R,
};

/* Exported macro ------------------------------------------------------------*/
41 42
#define   ADC_TOTAL_CH_NUMBER               (8U)
#define   ADC_SIGNAL_CH_NUMBER              (8U)
hu's avatar
hu committed
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
#define   ADC_REF_VOLTAGE                   u16ADCRefVoltage

/* Exported variables --------------------------------------------------------*/
extern volatile uint16_t u16ADCRefVoltage;

/* Exported functions --------------------------------------------------------*/
extern void Analog_Signal_Conv_Init(void);
extern void Analog_Signal_Conv_Stop(void);

extern void Analog_Signal_Conv_Service(void);

extern uint16_t ADC_Read_Signal(uint8_t u8ADCCh);
extern uint8_t  ADC_Read_Signal_Valid(uint8_t u8ADCCh);
extern uint16_t ADC_Conv_Single_Channel(uint8_t u8ADCCh);

/*! @} */
#ifdef __cplusplus
}
#endif

#endif /* ANALOG_SIGNALS_H__ */