You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.1 KiB
66 lines
1.1 KiB
#ifndef _msp_adc_H_
|
|
#define _msp_adc_H_
|
|
|
|
|
|
#include "stdio.h"
|
|
//#include "c_type51.h"
|
|
///#include "c_lib.h"
|
|
#include "bsp_config.h"
|
|
#include "msp_uart1.h"
|
|
///#include "msp_uartN.h"
|
|
|
|
#include "TTSS_task.h"
|
|
////#define L1_uartD_senduc(x) L0_uartN_uc(D_UART1,(x));
|
|
|
|
typedef struct
|
|
{
|
|
TS_task task;
|
|
|
|
vU8 ch_now;
|
|
|
|
|
|
vU8 chok1; ///当前通道的adc采样ok
|
|
vU8 chok2; ///当前通道的adc采样ok
|
|
vU8 change;
|
|
|
|
vU8 val;
|
|
vU8 fn;
|
|
|
|
|
|
vU32 sum1;
|
|
vU32 avrage1;
|
|
vU16 u16_out1;
|
|
vU8 u8_out1;
|
|
|
|
vU32 sum2;
|
|
vU32 avrage2;
|
|
vU16 u16_out2;
|
|
vU8 u8_out2;
|
|
|
|
|
|
vU32 sum3;
|
|
vU32 avrage3;
|
|
vU16 u16_out3;
|
|
vU8 u8_out3;
|
|
|
|
|
|
}TS_task_adc_;
|
|
|
|
extern TS_task_adc_ ts_task_adc;
|
|
|
|
#define D_TASK_adc_read 0x31
|
|
#define D_TASK_adc_change_ch 0x30
|
|
|
|
|
|
extern void L0_ADC_init(void);
|
|
extern U16 L1_ADC_Read_PT(u8 CHA);
|
|
#define D_cmd_filter_adc 0xfa
|
|
extern void L3_ADC_debug(u8 filter);
|
|
|
|
|
|
extern void L0_ADC_init(void);
|
|
extern U16 L1_ADC_Read_PT(u8 CHA);
|
|
extern void l2_task_adc_init();
|
|
extern void L3_task_adc_handle(TS_task_adc_ *s);
|
|
|
|
#endif //#ifndef _msp_iicM1_H_
|
|
|