#ifndef __ONECHIP_DEVINF_DEFINE_H_
#define __ONECHIP_DEVINF_DEFINE_H_


#include "oneChip_basic_define.h"
typedef enum {
	ONECHIP_DEV_STATE_NONE,
	ONECHIP_DEV_STATE_POWEROFF,
	ONECHIP_DEV_STATE_OFFLINE,
	ONECHIP_DEV_STATE_NEEDINIT,
	ONECHIP_DEV_STATE_RUNNING,
	ONECHIP_DEV_STATE_IDLE,
	ONECHIP_DEV_STATE_ERR,
}ONECHIP_DEV_STATE_TYPE;



#define ORG_NAME_MAX
#define SN_MAX       EEPROM_ADDR_DEV_SERIAL_LEN 


typedef enum {
	MINI7_SUB_FUN_MOTOR = 1,
	MINI7_SUB_FUN_HEATER1 ,
	MINI7_SUB_FUN_HEATER2 
}ONECHIP_SUB_FUN_TYPE;


typedef struct {
	unsigned int  desversion;  				/*描述版本，预留*/	
	unsigned char ORGName[8]; 	/*组织名称*/
	unsigned int  deveice_type;	 			/*设备类型*/
	unsigned int  deveice_ver;	 			/*设备批次*/
	unsigned char serialNumber[16];			
	unsigned int  hardware_type;			/*硬件类型*/
	unsigned int  hardware_ver;				/*硬件批次*/	
	unsigned int  structure_type;			/*结构类型*/		
	unsigned int  structure_ver;			/*结构批次*/		
	unsigned int  firstRunFlag;				/*硬件批次*/		
	unsigned int  updataFlag;				/*硬件批次*/		
}DeviceBasicInfdef,*pDeviceBasicInfdef;

typedef struct {
	DeviceBasicInfdef devdesc;
	unsigned int  ms10_flag;
	unsigned int  ms_conter;	
	unsigned int  conter10ms;		
	unsigned int  deal_espFlag;		
	unsigned int  reccmd_conter;	
	unsigned int  s1_flag;			
	unsigned int  s10_flag;		
	unsigned int  test_flag;	
	unsigned int  sysLoad_flag;	
	unsigned int  trigger_Tick;	
	unsigned int  int_ADC;	
	unsigned int  resetByIwdg;	
	unsigned int  connectTcpFlag;		
	unsigned int  pc_link_timeout;	
	unsigned int  pc_channel_recv;
	
	void * debugUart;	
	void * scannerUart;
	void * ESPUart;
	void * pb_Queue;		
	uint16_t  signal_trigger_pin;	
	void * signal_trigger_port;	
	uint16_t  com_led_pin;	
	void * com_led_port;	
	uint16_t  rgb_band_pin;	
	void * rgb_band_port;
	uint16_t  run_led_pin;	
	void * run_led_port;	
	char wifiname[64];
	char password[16];
	char TCP_IP_Addr[16];
unsigned char TCP_IP_PORT[8];
	
//	CNativeCommTypeDef  *g_pCommModule; 
}oneChipSysdef,*poneChipSysdef;


ONECHIP_GLOBAL_DEF oneChipSysdef sysinf;


#endif //__ONECHIP_BASIC_DEFINE_H_

