// General version config
//#define VER_AR168D			// AR1688 based programmer on July 28, 2006
//#define VER_AR168DS			// AR1688 based programmer for SST39VF1681 and other pin compatible flash
//#define VER_AR168E			// Fourth AR1688 test board on Aug 28, 2006, hardware version 4.00-4.05
//#define VER_AR168F			// AR168E with only 29 keys, hardware version 4.03-4.05
//#define VER_GF302				// High-link AR168F special version
#define VER_YWH201			// Yuxin AR168F special version
//#define VER_AR168G			// 37 keys AR168E with ST7565 dot matrix display
//#define VER_GP1266			// DigiMate extended GPIO key version with PoE support
//#define VER_BT2008			// BitCall extended GPIO key version with PoE support, 2x16 LCD
//#define VER_QX900W			// COSUN extended GPIO key version, 2x16 LCD, WT6104 chip
//#define VER_SENSOR			// MT9D111 sensor test board
//#define VER_AR168I			// Wi-Fi hardware 1.00
//#define VER_AR168J			// Hardware version 6.00
//#define VER_AR168K			// Hardware version 7.00, 2x16 LCD, 5x6 key
//#define VER_AR168KD			// Hardware version 10.00, 2x16 LCD, 5x6 key, DM9003, SST39VF1681
//#define VER_AR168KM			// 2x16 LCD, 5x6 key, Micrel KSZ8842, SST39VF1681
//#define VER_GP2266			// DigiMate AR168K with dot matrix display 
//#define VER_AR168L			// ATA hardware design 1.03, derived from AR168K
//#define VER_AR168LS			// ATA hardware design with SST flash
//#define VER_AR168M			// AR1688 VOIP Module
//#define VER_AR168MS			// AR1688 VOIP Module with SST39VF1681
//#define VER_BT2008N			// BitCall SST39VF1681
//#define VER_BT2008O			// same as BitCall BT2008N, just different key and some functions
//#define VER_FWV2800			// FunctionGroup Voip 2800
//#define VER_DXDT				// Same as GP2266, ShenOu Communication, WuHan
//#define VER_AR168N			// Network camera
//#define VER_AR168O			// GP2266 with DM9003
//#define VER_AR168P			// GP2266 with KSZ8842

// Protocols
//#define CALL_SIP
#define CALL_IAX2
//#define CALL_NONE			// for safe-recovery mode

// Country and District - according to http://www.iso.org/iso/country_codes
//#define RES_AR	// Argentina (Spanish)
//#define RES_AU	// Australia (English)
//#define RES_BE	// Belgium
//#define RES_BG	// Bulgaria (English)
//#define RES_BR	// Brazil (Portuguese)
//#define RES_CA	// Canada
//#define RES_CL	// Chile
#define RES_CN		// China (Mandarin) ***
//#define RES_CZ	// Czech Republic
//#define RES_DE	// Germany
//#define RES_EG	// Egypt
//#define RES_ES	// Spain
//#define RES_FR	// France
//#define RES_GB	// United
//#define RES_GR	// Greece
//#define RES_HK	// China HongKong
//#define RES_HU	// Hungary
//#define RES_IN	// India
//#define RES_IT	// Italy
//#define RES_JP	// Japan
//#define RES_KR	// Korea
//#define RES_LK	// Sri Lanka (Singhalese)
//#define RES_MX	// Mexico
//#define RES_NL	// Netherlands
//#define RES_NO	// Norway
//#define RES_NZ	// New Zealand
//#define RES_PL	// Poland
//#define RES_PT	// Portugal
//#define RES_RO	// Romania  
//#define RES_RU	// Russia
//#define RES_SG	// Singapore
//#define RES_SK	// Slovakia
//#define RES_TR	// Turkey
//#define RES_TW	// China Taiwan, use Traditional Chinese.
//#define RES_US	// United States (English) ***
//#define RES_VN	// Vietnam
//#define RES_ZA	// South Africa

// OEM defines
//#define OEM_2KLABS
//#define OEM_AEM
//#define OEM_AUTOTEST
//#define OEM_BIT2NET
//#define OEM_BT2008
//#define OEM_DEBUG
//#define OEM_INNOMEDIA
//#define OEM_IP20
//#define OEM_IVR
//#define OEM_LCDTEST
//#define OEM_MAC
//#define OEM_PROGRAM
//#define OEM_UART
//#define OEM_VLAN
//#define OEM_WEBNEED

/*************************** End of automatic change, DO NOT CHANGE this line! */

#ifdef VER_AR168D
#define MT28F016S5
#define SYS_PROGRAMMER
#endif

#ifdef VER_AR168DS
#define SST39VF1681
#define SYS_PROGRAMMER
#endif

#ifdef SYS_PROGRAMMER
#define RTL8019AS
#define KEY_4X4				// Basic 16 keys by GPIO_B(8)
#define LCD_HY1602
#endif

#ifdef VER_AR168E
#define KEY_ADC_2X11		// Extended 22 keys by ADC
#define LCD_HY1602
#endif

#if defined VER_GF302 || defined VER_YWH201
#define VER_AR168F
#endif

#ifdef VER_AR168F
#ifdef OEM_UART
#define SYS_UART
#define MT28F016S5
#define RTL8019AS
#else
#define KEY_ADC_2X7			// Extended 14 keys by ADC
#endif
#define LCD_HY1602
#endif

#ifdef VER_AR168G
#define KEY_ADC_2X11		// Extended 22 keys by ADC
#define LCD_ST7565
#define SYS_TEST
#endif

#if defined KEY_ADC_2X7 || defined KEY_ADC_2X11
#define KEY_4X4				// Basic 16 keys by GPIO_B(8)
#define KEY_ADC
#define MT28F016S5
#define RTL8019AS
#endif

#ifdef VER_GP1266
#define KEY_5X5				// GPIO_K(8)&D(2)
#define LCD_ST7565
#define SYS_TEST
#endif

#ifdef VER_BT2008
#define KEY_5X5				// GPIO_K(8)&D(2)
#define LCD_HY1602
#define MT28F016S5
#define OEM_BT2008
#endif

#ifdef VER_QX900W
#define KEY_5X5				// GPIO_K(8)&D(2)
#define LCD_HY1602
#define WT6104
#endif

#ifdef KEY_5X5
#define KEY_4X4				// Basic 16 keys by GPIO_B(8)
#define HOOK_GPIO			// GPIO_C2
#define MT28F016S5
#define RTL8019AS
#define SYS_DUAL_MIC
#endif

#ifdef VER_SENSOR
#define KEY_4X4				// Basic 16 keys by GPIO_B(8)
#define LCD_ST7565
#define SST39VF1681
#define RTL8019AS
#endif

#ifdef VER_AR168I
#define KEY_5X6				// GPIO_B(4)&D(2)
#define LCD_ST7565
#define MT28F016S5
#define RTL8019AS
#define SYS_USB
#endif

#ifdef VER_AR168J
#define KEY_7X8				// GPIO_B(8)
#define HOOK_GPIO			// GPIO_C2
#ifdef OEM_IP20
#define LCD_HY2004
#else
#define LCD_HY1602
#endif
#define MT28F016S5
#define RTL8019AS
#define SYS_DUAL_MIC
#endif

#ifdef VER_AR168K
#define KEY_5X6				// GPIO_B(4)&D(2)
#define YNTX_KEYPAD
#define HOOK_GPIO			// GPIO_C2
#define LCD_HY1602
#define MT28F016S5
#define RTL8019AS
#endif

#ifdef VER_AR168KD
#define KEY_5X6				// GPIO_B(4)&D(2)
#define HOOK_GPIO			// GPIO_C2
#define LCD_HY1602
#define SST39VF1681
#define DM9003EP
#endif

#ifdef VER_AR168KM
#define KEY_5X6				// GPIO_B(4)&D(2)
#define HOOK_GPIO			// GPIO_C2
#define LCD_HY1602
#define SST39VF1681
#define KSZ8842
#endif

#ifdef KEY_5X6
#define SYS_CHIP_PLUS
#endif

#ifdef VER_AR168L
#define MT28F016S5
#define RTL8019AS
#define SYS_CHIP_PLUS
#define SLIC_79R70
#endif

#ifdef VER_AR168LS
#define SST39VF1681
#define RTL8019AS
#define SYS_CHIP_PLUS
#define SLIC_79R70
#endif

#ifdef SLIC_79R70
#define IP_KEY
#endif

#ifdef VER_AR168M
#define SYS_UART
#define SERIAL_UI			// do not define this if you like to control serial communications totaly by yourself and do not use our standard 8051 UI
#define MT28F016S5
#define RTL8019AS
#define SYS_CHIP_PLUS
#endif

#ifdef VER_AR168MS
#define SYS_UART
//#define SERIAL_UI			// do not define this if you like to control serial communications totaly by yourself and do not use our standard 8051 UI
#define LCD_HY1602		// do not define LCD_XXXX and SERIAL_UI together
#define SST39VF1681
#define RTL8019AS
#define SYS_CHIP_PLUS
#endif

#ifdef VER_AR168N
#define SST39VF1681
#define DM9003EP
#define QL201B
#define SYS_CHIP_PLUS
#define IP_KEY
#endif

#ifdef VER_GP2266
#define RTL8019AS
#define KEY_8X5				// GPIO_B(4)&D4
#define LCD_ST7565
#define SYS_TEST
#endif

#if defined VER_BT2008N || defined VER_BT2008O
#define KEY_8X5				// GPIO_B(4)&D4
#ifndef OEM_IVR
#define LCD_ST7565
#endif
#define RTL8019AS
#define OEM_BT2008
#endif

#ifdef VER_FWV2800
#define KEY_8X5				// GPIO_B(4)&D4
#define LCD_ST7565
#define RTL8019AS
#endif

#ifdef VER_DXDT
#define KEY_8X5				// GPIO_B(4)&D4
#define LCD_ST7565
#define RTL8019AS
#endif

#ifdef VER_AR168O
#define KEY_8X5				// GPIO_B(4)&D4
#define LCD_ST7565
#define DM9003EP
#define SYS_TEST
#endif

#ifdef VER_AR168P
#define KEY_8X5				// GPIO_B(4)&D4
#define LCD_ST7565
#define KSZ8842
#define SYS_TEST
#endif

#ifdef KEY_8X5
#define HOOK_GPIO			// GPIO_C2
#define SST39VF1681
#define SYS_CHIP_PLUS
#endif

#ifdef CALL_NONE
#undef SYS_UART
#undef SERIAL_UI
#undef KEY_ADC
#undef KEY_5X5
#undef WT6104
#undef QL201B
#define SYS_DEBUG
#endif

#ifdef LCD_HY1602
#define DISPLAY_MAX_CHAR	16
#define DISPLAY_MAX_LINE	2
#define SYS_LCD
#endif

#ifdef LCD_HY2004
#define DISPLAY_MAX_CHAR	20
#define DISPLAY_MAX_LINE	4
#define UI_4_LINES
#define SYS_LCD
#endif

#ifdef LCD_ST7565
#define DISPLAY_DOT
#define DISPLAY_MAX_CHAR	16
#if defined VER_BT2008N || defined VER_BT2008O
#define DISPLAY_MAX_LINE	2
#else
#define DISPLAY_MAX_LINE	4
#define UI_4_LINES
#endif	// VER_BT2008N
#define SYS_LCD
#endif

#ifdef SERIAL_UI
#define DISPLAY_MAX_CHAR	16
#define DISPLAY_MAX_LINE	2
#define SYS_LCD
#endif

#ifndef SYS_LCD
#define DISPLAY_MAX_CHAR	16
#define DISPLAY_MAX_LINE	2
#endif

#ifdef SYS_CHIP_PLUS
#define SYS_DUAL_MIC
#endif

#ifdef OEM_DEBUG
#define SYS_DEBUG
#endif

#ifdef OEM_BT2008
#define MAX_VOLOUT	29
#endif

#ifdef SYS_DEBUG
#define VERIFY_CHECKSUM
#define VERIFY_FLASH
//#define LCD_DEBUG
//#define TEST_MD5
#endif

/*############################ Begin of automatic find software version, DO NOT CHANGE this line! */

#define SOFT_VER_HIGH		0
#define SOFT_VER_LOW		5
#define SOFT_VER_BUILD		0
#define ENG_BUILD_HIGH		0
#define ENG_BUILD_MID		0
#define ENG_BUILD_LOW		0
