www.pudn.com > M26(2M).rar > BloodGlucose.h, change:2016-01-05,size:3495b


/*************************************************************************************************** 
	* Copyright (c) 2015, BIOHERMOS 
	* All rights reserved. 
	* 文件名称: BloodGlucose.h 
	* 摘 要:    血糖主函数 
	* 当前版本: V1.0, 易建, 2015-10-09 
	* 更改记录: 无 
***************************************************************************************************/ 
 
#ifndef _BLOOD_H_ 
#define _BLOOD_H_ 
 
#include "Includes.h" 
 
// HCT发射电极 
#define     SW_CHANNEL_HCT_ON           P4OUT &= ~BIT4 
#define     SW_CHANNEL_HCT_OFF          P4OUT |= BIT4 
 
#define     SW_TEST_HCT_OFF             P6OUT |= BIT1 
#define     SW_TEST_HCT_ON              P6OUT &= ~BIT1 
 
// BG工作电极 
#define     SW_CHANNEL_BG_OFF           P4OUT |= BIT5 
#define     SW_CHANNEL_BG_ON            P4OUT &= ~BIT5 
 
#define     SW_TEST_BG_OFF              P3OUT |= BIT2 
#define     SW_TEST_BG_ON               P3OUT &= ~BIT2 
 
#define     SW_ISD_A_ON                 P3OUT &= ~BIT4 
#define     SW_ISD_A_OFF                P3OUT |= BIT4 
#define     SW_ISD_K_ON                 P4OUT &= ~BIT3 
#define     SW_ISD_K_OFF                P4OUT |= BIT3 
 
// Code电极PIN7 
#define     SCAN_POLE1_HIGH_ON          P1OUT |= BIT6 
#define     SCAN_POLE1_HIGH_OFF         P1OUT &= ~BIT6 
#define     SCAN_POLE1_LOW_ON           P4OUT |= BIT0 
#define     SCAN_POLE1_LOW_OFF          P4OUT &= ~BIT0 
 
//  Code电极PIN6 
#define     SCAN_POLE2_HIGH_ON          P6OUT |= BIT7 
#define     SCAN_POLE2_HIGH_OFF         P6OUT &= ~BIT7 
#define     SCAN_POLE2_LOW_ON           P2OUT |= BIT6 
#define     SCAN_POLE2_LOW_OFF          P2OUT &= ~BIT6 
 
//  Code电极PIN5 
#define     SCAN_POLE3_HIGH_ON          P3OUT |= BIT2 
#define     SCAN_POLE3_HIGH_OFF         P3OUT &= ~BIT2 
#define     SCAN_POLE3_LOW_ON           P3OUT |= BIT3 
#define     SCAN_POLE3_LOW_OFF          P3OUT &= ~BIT3 
 
// 唤醒电极PIN3 
#define     WAKEUP_POLE_HIGH_ON         P1OUT |= BIT1 
#define     WAKEUP_POLE_HIGH_OFF        P1OUT &= ~BIT1 
#define     WAKEUP_POLE_LOW_ON          P3OUT |= BIT5 
#define     WAKEUP_POLE_LOW_OFF         P3OUT &= ~BIT5 
#define     WAKEUP_PIN_STATUSE          (P1IN & BIT7) 
 
// 正弦波端口 
#define     SINE_WAVE_ON                P2OUT ^=  BIT3 
#define     SINE_WAVE_OFF               P2OUT &= ~BIT3 
 
#define     SAMP_DATA_BUFF_LEN          40 
 
extern u8  g_u8EnSineWave;                              // hct正弦波 
extern u8  g_u8TimerCnt;                                // 计数器 
extern u8  g_u8EnTimer;                                 // 定时器使 
extern u8  g_u8HCT_EnSample;                            // 使能采样 
extern u8  g_u8BG_EnSample;                             // 使能采样 
extern u16 g_u16CountdownTimer; 
extern u8  g_u8HCT_SampTime; 
extern u8  g_u8EnSampDataSend;                          // 使能数据发生 
extern u8  g_u8EnAdcSample; 
 
extern u16 g_u16HCT_SampData[SAMP_DATA_BUFF_LEN]; 
extern u16 g_u16BG_SampData[SAMP_DATA_BUFF_LEN]; 
extern u8  g_u8HCT_SampDataW; 
extern u8  g_u8HCT_SampDataR; 
extern u8  g_u8BG_SampDataW; 
extern u8  g_u8BG_SampDataR; 
 
extern u16 g_u16SendData[10]; 
extern u8  g_u8SendDataW; 
extern u8  g_u8SendDataR; 
 
extern void HCT_SaveSampData(void); 
extern void BG_SaveSampData(void); 
 
extern u8  g_u8HCT_DetStatus;                                           // HCT开始检测 
extern u8  g_u8BG_DetStatus;                                            // BG开始检测 
 
extern void BloodGlucose(void); 
extern u8 QuectelM26_Init(void); 
 
#endif