#ifndef __UWater_SELF_TEST_H
#define __UWater_SELF_TEST_H


#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "type.h"
	
#define RX_CHECK_ADC         ADC_ONE
#define RX_CHECK_CHANNEL     3
#define RX_CHECK_NUM         10
#define RX_CHECK_INTERVAL    100

#define TEST_SELF_IDLE         0
#define TEST_SELF_MAC_GET      1
#define TEST_SELF_EE_WR        2
#define TEST_SELF_EE_WR_WT     3
#define TEST_SELF_EE_OFF_WT    4
#define TEST_SELF_EE_RD_CK     5
#define TEST_SELF_HALL_CK      6
#define TEST_SELF_RTCC_CK      7
#define TEST_SELF_IR_CK1       8
#define TEST_SELF_IR_CK2       9
#define TEST_SELF_SEND_RESULT  10
#define TEST_SELF_SEND_WAIT    11

typedef union
{
    struct
    {
			u32 MacBits0 : 6;
			u32 MacBits1 : 6;
			u32 MacBits2 : 6;
			u32 MacBits3 : 6;
			u32 MacBits4 : 6;
			u32 MacBits5 : 6;
			u32 MacBits6 : 6;
			u32 MacBits7 : 6;
			u32 MacWAF_NUM : 8;
    } s; //日历和时间结构体
    u8 buf[7]; // BYTE access
} MCU_MAC;

extern void SelfTest_Proc(void);
extern void SelfTest_Start(void);
extern void SelfTest_End(void);
extern u8 SelfTest_GetResult(u8 *pBuf);

#endif


