#define FN_IR			1
#define	FN_SBUS			2
#define FN_SER			4
#define FN_USB			8
#define FN_POWERON		16
#define FN_EXT_SW		32
#define FN_CALIBRATE	64
#define FN_SOFTID		128
#define FN_EEPROM		256
#define FN_TRANSL		512
#define FN_HWCARR		1024
#define FN_DUALRCV		2048
#define FN_SBUS_UART	4096
#define FN_FLASH128		8192
#define FN_DUALSND		16384
#define FN_DISP1		32768
#define FN_DISP2		0x10000
#define FN_DISP3		0x20000
#define FN_CLOCK		0x40000
#define FN_DEBOUNCE		0x80000
#define FN_BOOTLOADER	0x100000
#define FN_DUALPOWERON	0x200000
#define FN_USBWAKEUP	0x400000
#define FN_NOSCROLL		0x800000
#define FN_LAN			0x1000000
#define FN_IRDB			0x2000000
#define FN_LARGECPU		0x4000000
#define FN_MULTIRELAY4	0x8000000
#define FN_MULTISEND4	0x10000000
#define FN_MULTISEND8	0x20000000
#define FN_MULTISEND2	0x40000000
#define FN_HTML			0x80000000

#define FN2_FUNCTIONVAL2	1
#define FN2_EXT_RCV			2
#define FN2_ONEWIRE			4
#define FN2_PULSE200		8
#define FN2_V38				16
#define FN2_RECS80			32
#define FN2_PULSELEN_18		64
#define	FN2_SW_RCV_SEL		128
#define FN2_RTS_CTS			256
#define FN2_MULTIRELAY2		512
#define FN2_DUTYCYCLE		1024
#define FN2_SBUS_SEND		2048
#define FN2_SEND_ACK		4096
#define FN2_USB_WAKEUP		8192
#define FN2_STATEIO_SBUS	16384
#define FN2_STATEIO_ANALOG	32768
#define FN2_RS232_IO_SBUS		0x10000
#define FN2_RS232_OUT_IR		0x20000
#define FN2_AUX_RS232			0x40000
#define FN2_RS232_PARAMETER		0x80000
#define FN2_EXTRS232_PARAMETER	0x100000
#define FN2_MULTISEND16			0x200000
#define FN2_STATEIO_IRIN		0x400000
#define FN2_SW_SEL_EXT_LOW		0x800000
#define FN2_IRIN_EXTRA_LINE		0x1000000
#define FN2_RELAY_SBUS			0x2000000
#define FN2_EXT_HI_LO_SINGLE	0x4000000				// Single External RCV Connector for HI&LOW RCV
#define FN2_RC5_FREE_TIMING		0x8000000
#define FN2_INTERNAL_PLASMA		0x10000000
#define FN2_HF_BLASTER			0x20000000
#define FN2_RS232_IN_IR			0x40000000
#define FN2_RS232_UDP_RELAY		0x80000000



#define FN3_RCV_LOW_56			1
#define FN3_RCV_LOW_38			2
#define FN3_RCV_LOW_38_PLAS		3
#define FN3_RCV_LOW_455			4
#define FN3_RCV_LOW_455_PLAS	5
#define FN3_RCV_LOW_CODELEARN	6
#define FN3_RCV_LOW_CODELEARN_N	7
#define FN3_RCV_LOW_ACTIVE		8

#define FN3_RCV_HI_56			16
#define FN3_RCV_HI_38			32
#define FN3_RCV_HI_38_PLAS		48
#define FN3_RCV_HI_455			64
#define FN3_RCV_HI_455_PLAS		80
#define FN3_RCV_HI_CODELEARN	96
#define FN3_RCV_HI_CODELEARN_N	112
#define FN3_RCV_HI_ACTIVE		128

#define FN3_DUAL_RCV_EXTERNAL	256
#define FN3_WLAN				512
#define FN3_MULTISTREAM			1024
#define FN3_VAR_SEND_POWER		2048
#define FN3_NO_RECEIVE			4096
#define FN3_SEND_MACRO			8192
#define FN3_ONE_WIRE_IR1		16384
#define FN3_ONE_WIRE_IR2		32768
#define FN3_ONE_WIRE_ANALOG1	0x10000
#define FN3_ONE_WIRE_ANALOG2	0x20000
#define FN3_IRIN_ANALOG			0x40000
#define FN3_TRANSLATOR_IRDB		0x80000
#define FN3_ANALOG_LEVEL		0x100000
#define FN3_STATEIO_AUX			0x200000
#define FN3_ONE_WIRE_AUX		0x400000
#define FN3_RS232_OUT_IR2		0x800000
#define FN3_RS232_OUT_IR4		0x1000000
#define FN3_RS232_ANALOG2		0x2000000
#define FN3_RS232_IRIN1			0x4000000
#define FN3_RS232_IRIN2			0x8000000
#define FN3_MULTI_RS232			0x10000000


#define FN_DISPMASK	0x38000
#define FUNCTION_FLASH_MASK		~(FN_SBUS_UART | FN_CLOCK | FN_DEBOUNCE | FN_DUALPOWERON | FN_USBWAKEUP | FN_NOSCROLL | FN_TRANSL | FN_CALIBRATE | FN_POWERON)
#define FUNCTION_FLASH_MASK_2	(FN2_AUX_RS232 | FN2_MULTISEND16 | FN2_EXT_RCV | FN2_V38)

#define FN_DEVICETYPE_MASK				63
#define FN4_DEVICETYPE_OTHER			0
#define FN4_DEVICETYPE_USB_3_6			1
#define FN4_DEVICETYPE_USB_3_8			2
#define FN4_DEVICETYPE_TRANS_2_0		3
#define FN4_DEVICETYPE_TRANS_3_2		4
#define FN4_DEVICETYPE_TRANS_XL			5
#define FN4_DEVICETYPE_LAN_1_2			6
#define FN4_DEVICETYPE_LAN_2_2			7	// POE 1.3
#define FN4_DEVICETYPE_LAN_2_3			8	// POE 2.1
#define FN4_DEVICETYPE_LAN_3			9
#define FN4_DEVICETYPE_MICRO_WIFI		10
#define FN4_DEVICETYPE_LANIO_1_5		11
#define FN4_DEVICETYPE_LANIO_CTL_1_5	12
#define FN4_DEVICETYPE_RS232_3_6		13
#define FN4_DEVICETYPE_RS232_3_8		14
#define FN4_DEVICETYPE_BUS_3_5			15
#define FN4_DEVICETYPE_BUS_3_8			16
#define FN4_DEVICETYPE_WIFI_1_5			17
#define FN4_DEVICETYPE_LANC				18
#define FN4_DEVICETYPE_LANC_XL			19
#define FN4_DEVICETYPE_LANC_XXL			20
#define FN4_DEVICETYPE_LANC_MS_16		21
#define FN4_DEVICETYPE_OEM				22
#define FN4_DEVICETYPE_LAN_2_64			23	// POE 1.3 mit 644P
#define FN4_DEVICETYPE_LANC_XL_V2		24
#define FN4_DEVICETYPE_LANCTRL_V2		25
#define FN4_DEVICETYPE_LANC_MS_V2		26
