/*
 *************************************************************************
 *                                                                       *
 *                      ROBERT BOSCH GMBH                                *
 *                          STUTTGART                                    *
 *                                                                       *
 *          Alle Rechte vorbehalten - All rights reserved                *
 *                                                                       *
 *************************************************************************

 module:           var287.c

 derived from:     var280.c

 function:         Variantenselektion für Projekt ME7.1 05/6004.01 
 					(V6, 71052)


 FDEF:             %VAR 287.220


 *************************************************************************
 * Administrative Information (automatically filled in by PVCS)          *
 *************************************************************************
 * $Archive:  
 * $Author:   LEE2SK  $
 * $Date:   Oct 25 2000 04:27:48  $
 * $Revision:   22.0  $
 *************************************************************************


 *************************************************************************
 * Points to be taken into consideration when/if the module is modified: *
 *************************************************************************

 >>>>>>> -------------------------------------<<<<<<<
 >>>>>>> Anzupassende Stellen suchen mit '##' <<<<<<<
 >>>>>>> -------------------------------------<<<<<<<

 List Of Changes
 ***************

 <date>     <name>      <rev>   <description>

 24.10.97   K3/EEV3 Ci  1.0     N: Variantenselektion für Projekt ME7.1 05/6004.01 
 								(V6, 71052)
 03.12.97   K3/EEV3 Ci  2.0     F: In function checkVarKod call ForcePowerfail added
								   for activating a powerfail at the next restart,
								I: Function setVarKod new, for writing directly 
								   in eeprom by k71mn501.c
 05.12.97   K3/EEV3 Ci  2.1     F: Variantenkriterium vkFzgtyp2 added
 29.01.98   K3/EEV3 Ci  3.0     F: Variantenkriterium vkGetriebe2 added 
 20.03.98   K3/EEV3 Ci  4.0     F: Code-Anteile für Assembler-Variantenkodierung
  									aktiviert, wegen Aussetzererkennung
 22.04.98   K3/EEV3 Ci  4.1     F: Variantenkriterium Getriebeart3 für
 									Aussetzererkennung eingeführt
 15.05.98   K3/EEV3 Ci  4.2     F: Änderung Codierziffern "Spezial",
 									Liste der unterstützten Varianten VARTABC erweitert
 19.05.98   K3/EEV3 Ci  4.3     I: VARTABC nach far verlegt, weil in near nicht mehr 
 									genügend Platz war
 10.06.98   K3/EEV3 Ci  5.0     I: no changes
 18.06.98   K3/EEV3 Ci  5.1     P: Schleifenzähler i als Word definiert
 25.08.98	K3/EEV3 Ci	6.0		F: Variantenkriterium Abgas hinzu
 10.09.98   K3/EEV3 Ci  6.0.1.0 S: Variantenkriterium Abgas korrigiert in VARTABC
 09.12.98   K3/EFS5 Ci  8.0     I: nur noch projektspezifische Anteile
 08.02.99	K3/ESI4-Fe	9.0		F: new FDEF version %VAR287.90
								   (changed nothing in .c)	
 03.03.99	K3/ESI4-Fe	10.0	F: new FDEF version %VAR287.100
	 							   (added coding for MJ00 and MJ99, switch for ESKONF in 
 								   case of B_epcden)	
 30.03.99	K3/ESI4-Fe	11.0	F: new FDEF version %VAR287.110
								   (changed nothing in .c)	
 27.05.99   K3/ESI4 Ls  12.0    F: new FDEF version %VAR287.120
 								I: bit access for B_epcden changed to bitmacro
								I: rename define NULL to ZERO and EINS to ONE
 08.10.99	K3/ESI4-Fe	13.0	F: new FDEF version %VAR287.130
								   (no changes here)	
 06.12.99	AS-PMO-Fe	14.0	F: new FDEF version %VAR287.140
								   (no changes here)	
 06.01.00	RBKR/SAE31-PDK	15.0	F: %VAR287.140 -> %VAR287.150
 17.02.00	RBKR/SAE31-PDK	16.0	F: %VAR287.150 -> %VAR287.160 (nothing changed here!)
 24.03.00	RBKR/SAE31-PDK	17.0	F: %VAR287.160 -> %VAR287.170 (nothing changed here!)
 09.05.00	RBKR/SAE31-PDK	18.0	F: %VAR287.170 -> %VAR287.180 (nothing changed here!)
 22.05.00	RBKR/SAE31-PDK	19.0	F: %VAR287.180 -> %VAR287.190 (nothing changed here!)
 28.06.00	RBKR/SAE31-PDK	20.0	F: %VAR287.190 -> %VAR287.200 (nothing changed here!)
 19.09.00	RBKR/AEG1-KDJ	21.0	F: %VAR287.200 -> %VAR287.210
 25.10.00	RBKR/AEG1-KDJ	22.0	F: %VAR287.210 -> %VAR287.220 (nothing changed here!)
 \*{list_of_changes...}*\

 *************************************************************************
*/


#define     VAR_ModId                /* module identifier */


/* Include Headerfiles                                                  */
/* ===================                                                  */


#include   PROJECT_H       /* project specific header file              */
                           /*  (defined in MAK- or PSB-file)            */
#include   <var.d>
                           /* DAMOS definitions and declarations:       */
                           /*  - definitions of local RAMs, exported    */
                           /*    RAMs and Application Parameters        */
                           /*  - declarations of imported RAMs and      */
                           /*    Application Parameters                 */

#include	<varasm.v>  	  /* ## nur notwendig, wenn es Assembler-Kenngrößen
							  gibt, die variantencodiert sind */
/************************************************************************/
/*                 Module Internal Definitions                          */
/************************************************************************/

/* Define-Constants                                                     */
/* ================                                                     */

/*{constant_definition...}*/

#define ONE		0x01
#define ZERO	0x0

/* Macros Local To This Module                                          */
/* ===========================                                          */

/*{macro_definition...}*/

/* Local Module RAM-Definitions (attribute static)                      */
/* ===============================================                      */

/* Definition of variables only local to this module. That is, not to   */
/* be exported to other modules and not relevant for calibration.       */

/*{static_ram_definition...}*/
/*{static_bitstruktur_definition...}*/

/* Local Constant Definitions											*/
/* ===============================================                      */

typedef struct 
{
	Word	TabPmcod;			/* Parametercode  			*/
	Byte	TabAntrieb;			/* Index für vkAntrieb  	*/
	Byte	TabASR;				/* Index für vkASR  		*/
	Byte	TabGetriebe;		/* Index für vkGetriebe 	*/
	Byte	TabGetriebe2;		/* Index für vkGetriebe2 	*/
	Byte	TabGetriebe3;		/* Index für vkGetriebe3 	*/
	Byte	TabFzgtyp;			/* Index für vkFzgtyp  		*/
	Byte	TabFzgtyp2;			/* Index für vkFzgtyp2  	*/
	Byte	TabAbgas;			/* Index für vkAbgas  		*/
	Byte	TabAbgas2;			/* Index für vkAbgas2  		*/
} T_vartabc;					/* ## */

/* Absicherung: ANZ_VARTAB (definiert in VARx.KGS)
 darf nie größer sein als ANZ_VARTAB) */
#if (ANZ_VARTAB > ANZ_VARTABC)  
  #error >>>> VAR: value out of range {ANZ_VARTAB > ANZ_VARTABC} <<<<<
#endif							

const T_vartabc far VARTABC[ANZ_VARTABC] = { /* ## */
		/* 	vkAntrieb 	= 0 : Front
			vkAntrieb 	= 1 : Quattro
			--------------------------
			vkASR		= 0	: mit ASR
			vkASR		= 1	: ohne ASR
			--------------------------
			vkGetriebe	= 0 : HS 5-Gang
			vkGetriebe	= 1 : ZF 5HP-19
			vkGetriebe	= 2 : CVT
			--------------------------
			vkGetriebe2	= 0 : HS 
			vkGetriebe2	= 1 : AT ( ZF 5HP-19 oder CVT)
			--------------------------
			vkGetriebe3	= 0 : HS oder CVT
			vkGetriebe3	= 1 : ZF 5HP-19
			--------------------------
			vkFzgtyp	= 0 : B/D-Klasse
			vkFzgtyp	= 1 : C-Klasse								   
			--------------------------
			vkFzgtyp2	= 0 : B/C-Klasse
			vkFzgtyp2	= 1 : D-Klasse									
			--------------------------
			vkAbgas		= 0 : E4/D3/LEV/GUS/EU4, Taiwan
			vkAbgas		= 1 : Bras								   
			--------------------------
			vkAbgas2 	= 0 : E4/D3/LEV/GUS/EU4, Bras
			vkAbgas2 	= 1 : Taiwan								   
			--------------------------								  */

		/* 	Achtung:  Index 0 soll laut H.Ludwig in diesem Projekt 
		              keine Automat-Variante sein ! 	*/
		/*  PMC		vkAntrieb,	vkASR,	vkGetriebe,	vkGetriebe2, vkGetriebe3, vkFzgtyp, vkFzgtyp2, vkAbgas, vkAbgas2	  */
/* E4 */	 4001,	0,			1,		0,			0,			 0,			  0,	 	0,	 	   0,		0,	/* HS 5-Gang */
		 	 4002, 	0,			1,		0,			0,			 0,			  1, 	 	0,		   0,		0,
			 4003, 	0,			1,		0,			0,			 0,			  0, 	 	1,		   0,		0,
			 4501, 	0,			0,		0,			0,			 0,			  0, 	 	0,		   0,		0,
			 4502, 	0,			0,		0,			0,			 0,			  1, 	 	0,		   0,		0,
			 4503, 	0,			0,		0,			0,			 0,			  0, 	 	1,		   0,		0,
			 4201, 	1,			1,		0,			0,			 0,			  0, 	 	0,		   0,		0,
			 4202, 	1,			1,		0,			0,			 0,			  1, 	 	0,		   0,		0,
			 4203, 	1,			1,		0,			0,			 0,			  0, 	 	1,		   0,		0,
			 4701, 	1,			0,		0,			0,			 0,			  0, 	 	0,		   0,		0,
			 4702, 	1,			0,		0,			0,			 0,			  1, 	 	0,		   0,		0,
			 4703, 	1,			0,		0,			0,			 0,			  0, 		1,		   0,		0,
				 
			 4051,	0,			1,		1,			1,			 1,			  0,	 	0,	 	   0,	 	0,	/* ZF 5HP-19 */
			 4052, 	0,			1,		1,			1,			 1,			  1, 	 	0,		   0,		0,
			 4053, 	0,			1,		1,			1,			 1,			  0, 	 	1,		   0,		0,
			 4551, 	0,			0,		1,			1,			 1,			  0, 	 	0,		   0,		0,
			 4552, 	0,			0,		1,			1,			 1,			  1, 	 	0,		   0,		0,
			 4553, 	0,			0,		1,			1,			 1,			  0, 	 	1,		   0,		0,
			 4251, 	1,			1,		1,			1,			 1,			  0, 	 	0,		   0,		0,
			 4252, 	1,			1,		1,			1,			 1,			  1, 	 	0,		   0,		0,
			 4253, 	1,			1,		1,			1,			 1,			  0, 	 	1,		   0,		0,
			 4751, 	1,			0,		1,			1,			 1,			  0, 	 	0,		   0,		0,
			 4752, 	1,			0,		1,			1,			 1,			  1, 	 	0,		   0,		0,
			 4753, 	1,			0,		1,			1,			 1,			  0, 		1,		   0,		0,
				 
			 4081,	0,			1,		2,			1,			 0,			  0,	 	0,	 	   0,	 	0,	/* CVT */	
			 4082, 	0,			1,		2,			1,			 0,			  1, 	 	0,		   0,		0,
			 4581, 	0,			0,		2,			1,			 0,			  0, 	 	0,		   0,		0,
			 4582, 	0,			0,		2,			1,			 0,			  1, 	 	0,		   0,		0,
			 4281, 	1,			1,		2,			1,			 0,			  0, 	 	0,		   0,		0,
			 4282, 	1,			1,		2,			1,			 0,			  1, 	 	0,		   0,		0,
			 4781, 	1,			0,		2,			1,			 0,			  0, 	 	0,		   0,		0,
			 4782, 	1,			0,		2,			1,			 0,			  1, 	 	0,		   0,		0,
				 											 
/* EU3 */	 5001,	0,			1,		0,			0,			 0,			  0,	 	0,	 	   0,	 	0,	/* HS 5-Gang */
		 	 5002, 	0,			1,		0,			0,			 0,			  1, 	 	0,		   0,		0,
			 5003, 	0,			1,		0,			0,			 0,			  0, 	 	1,		   0,		0,
			 5501, 	0,			0,		0,			0,			 0,			  0, 	 	0,		   0,		0,
			 5502, 	0,			0,		0,			0,			 0,			  1, 	 	0,		   0,		0,
			 5503, 	0,			0,		0,			0,			 0,			  0, 	 	1,		   0,		0,
			 5201, 	1,			1,		0,			0,			 0,			  0, 	 	0,		   0,		0,
			 5202, 	1,			1,		0,			0,			 0,			  1, 	 	0,		   0,		0,
			 5203, 	1,			1,		0,			0,			 0,			  0, 	 	1,		   0,		0,
			 5701, 	1,			0,		0,			0,			 0,			  0, 	 	0,		   0,		0,
			 5702, 	1,			0,		0,			0,			 0,			  1, 	 	0,		   0,		0,
			 5703, 	1,			0,		0,			0,			 0,			  0, 		1,		   0,		0,
				 
			 5051,	0,			1,		1,			1,			 1,			  0,	 	0,	 	   0,	 	0,	/* ZF 5HP-19 */
			 5052, 	0,			1,		1,			1,			 1,			  1, 	 	0,		   0,		0,
			 5053, 	0,			1,		1,			1,			 1,			  0, 	 	1,		   0,		0,
			 5551, 	0,			0,		1,			1,			 1,			  0, 	 	0,		   0,		0,
			 5552, 	0,			0,		1,			1,			 1,			  1, 	 	0,		   0,		0,
			 5553, 	0,			0,		1,			1,			 1,			  0, 	 	1,		   0,		0,
			 5251, 	1,			1,		1,			1,			 1,			  0, 	 	0,		   0,		0,
			 5252, 	1,			1,		1,			1,			 1,			  1, 	 	0,		   0,		0,
			 5253, 	1,			1,		1,			1,			 1,			  0, 	 	1,		   0,		0,
			 5751, 	1,			0,		1,			1,			 1,			  0, 	 	0,		   0,		0,
			 5752, 	1,			0,		1,			1,			 1,			  1, 	 	0,		   0,		0,
			 5753, 	1,			0,		1,			1,			 1,			  0, 		1,		   0,		0,
				 
			 5081,	0,			1,		2,			1,			 0,			  0,	 	0,	 	   0,	 	0,	/* CVT */	
			 5082, 	0,			1,		2,			1,			 0,			  1, 	 	0,		   0,		0,
			 5581, 	0,			0,		2,			1,			 0,			  0, 	 	0,		   0,		0,
			 5582, 	0,			0,		2,			1,			 0,			  1, 	 	0,		   0,		0,
			 5281, 	1,			1,		2,			1,			 0,			  0, 	 	0,		   0,		0,
			 5282, 	1,			1,		2,			1,			 0,			  1, 	 	0,		   0,		0,
			 5781, 	1,			0,		2,			1,			 0,			  0, 	 	0,		   0,		0,
			 5782, 	1,			0,		2,			1,			 0,			  1, 	 	0,		   0,		0,
				 											 
/* LEV */	 7001,	0,			1,		0,			0,			 0,			  0,	 	0,	 	   0,	 	0,	/* HS 5-Gang */
		 	 7002, 	0,			1,		0,			0,			 0,			  1, 	 	0,		   0,		0,
			 7003, 	0,			1,		0,			0,			 0,			  0, 	 	1,		   0,		0,
			 7501, 	0,			0,		0,			0,			 0,			  0, 	 	0,		   0,		0,
			 7502, 	0,			0,		0,			0,			 0,			  1, 	 	0,		   0,		0,
			 7503, 	0,			0,		0,			0,			 0,			  0, 	 	1,		   0,		0,
			 7201, 	1,			1,		0,			0,			 0,			  0, 	 	0,		   0,		0,
			 7202, 	1,			1,		0,			0,			 0,			  1, 	 	0,		   0,		0,
			 7203, 	1,			1,		0,			0,			 0,			  0, 	 	1,		   0,		0,
			 7701, 	1,			0,		0,			0,			 0,			  0, 	 	0,		   0,		0,
			 7702, 	1,			0,		0,			0,			 0,			  1, 	 	0,		   0,		0,
			 7703, 	1,			0,		0,			0,			 0,			  0, 		1,		   0,		0,
				 
			 7051,	0,			1,		1,			1,			 1,			  0,	 	0,	 	   0,	 	0,	/* ZF 5HP-19 */
			 7052, 	0,			1,		1,			1,			 1,			  1, 	 	0,		   0,		0,
			 7053, 	0,			1,		1,			1,			 1,			  0, 	 	1,		   0,		0,
			 7551, 	0,			0,		1,			1,			 1,			  0, 	 	0,		   0,		0,
			 7552, 	0,			0,		1,			1,			 1,			  1, 	 	0,		   0,		0,
			 7553, 	0,			0,		1,			1,			 1,			  0, 	 	1,		   0,		0,
			 7251, 	1,			1,		1,			1,			 1,			  0, 	 	0,		   0,		0,
			 7252, 	1,			1,		1,			1,			 1,			  1, 	 	0,		   0,		0,
			 7253, 	1,			1,		1,			1,			 1,			  0, 	 	1,		   0,		0,
			 7751, 	1,			0,		1,			1,			 1,			  0, 	 	0,		   0,		0,
			 7752, 	1,			0,		1,			1,			 1,			  1, 	 	0,		   0,		0,
			 7753, 	1,			0,		1,			1,			 1,			  0, 		1,		   0,		0,
				 
			 7081,	0,			1,		2,			1,			 0,			  0,	 	0,	 	   0,	 	0,	/* CVT */	
			 7082, 	0,			1,		2,			1,			 0,			  1, 	 	0,		   0,		0,
			 7581, 	0,			0,		2,			1,			 0,			  0, 	 	0,		   0,		0,
			 7582, 	0,			0,		2,			1,			 0,			  1, 	 	0,		   0,		0,
			 7281, 	1,			1,		2,			1,			 0,			  0, 	 	0,		   0,		0,
			 7282, 	1,			1,		2,			1,			 0,			  1, 	 	0,		   0,		0,
			 7781, 	1,			0,		2,			1,			 0,			  0, 	 	0,		   0,		0,
			 7782, 	1,			0,		2,			1,			 0,			  1, 	 	0,		   0,		0,
				 											 	 
/* GUS/Ch */ 8001,	0,			1,		0,			0,			 0,			  0,	 	0,	 	   0,	 	0,	/* HS 5-Gang */
		 	 8002, 	0,			1,		0,			0,			 0,			  1, 	 	0,		   0,		0,
			 8003, 	0,			1,		0,			0,			 0,			  0, 	 	1,		   0,		0,
			 8501, 	0,			0,		0,			0,			 0,			  0, 	 	0,		   0,		0,
			 8502, 	0,			0,		0,			0,			 0,			  1, 	 	0,		   0,		0,
			 8503, 	0,			0,		0,			0,			 0,			  0, 	 	1,		   0,		0,
			 8201, 	1,			1,		0,			0,			 0,			  0, 	 	0,		   0,		0,
			 8202, 	1,			1,		0,			0,			 0,			  1, 	 	0,		   0,		0,
			 8203, 	1,			1,		0,			0,			 0,			  0, 	 	1,		   0,		0,
			 8701, 	1,			0,		0,			0,			 0,			  0, 	 	0,		   0,		0,
			 8702, 	1,			0,		0,			0,			 0,			  1, 	 	0,		   0,		0,
			 8703, 	1,			0,		0,			0,			 0,			  0, 		1,		   0,		0,
				 
			 8051,	0,			1,		1,			1,			 1,			  0,	 	0,	 	   0,	 	0,	/* ZF 5HP-19 */
			 8052, 	0,			1,		1,			1,			 1,			  1, 	 	0,		   0,		0,
			 8053, 	0,			1,		1,			1,			 1,			  0, 	 	1,		   0,		0,
			 8551, 	0,			0,		1,			1,			 1,			  0, 	 	0,		   0,		0,
			 8552, 	0,			0,		1,			1,			 1,			  1, 	 	0,		   0,		0,
			 8553, 	0,			0,		1,			1,			 1,			  0, 	 	1,		   0,		0,
			 8251, 	1,			1,		1,			1,			 1,			  0, 	 	0,		   0,		0,
			 8252, 	1,			1,		1,			1,			 1,			  1, 	 	0,		   0,		0,
			 8253, 	1,			1,		1,			1,			 1,			  0, 	 	1,		   0,		0,
			 8751, 	1,			0,		1,			1,			 1,			  0, 	 	0,		   0,		0,
			 8752, 	1,			0,		1,			1,			 1,			  1, 	 	0,		   0,		0,
			 8753, 	1,			0,		1,			1,			 1,			  0, 		1,		   0,		0,
				 
			 8081,	0,			1,		2,			1,			 0,			  0,	 	0,	 	   0,	 	0,	/* CVT */	
			 8082, 	0,			1,		2,			1,			 0,			  1, 	 	0,		   0,		0,
			 8581, 	0,			0,		2,			1,			 0,			  0, 	 	0,		   0,		0,
			 8582, 	0,			0,		2,			1,			 0,			  1, 	 	0,		   0,		0,
			 8281, 	1,			1,		2,			1,			 0,			  0, 	 	0,		   0,		0,
			 8282, 	1,			1,		2,			1,			 0,			  1, 	 	0,		   0,		0,
			 8781, 	1,			0,		2,			1,			 0,			  0, 	 	0,		   0,		0,
			 8782, 	1,			0,		2,			1,			 0,			  1, 	 	0,		   0,		0,
				 											 
/* EU4 */	11001,	0,			1,		0,			0,			 0,			  0,	 	0,	 	   0,	 	0,	/* HS 5-Gang */
			11002, 	0,			1,		0,			0,			 0,			  1, 	 	0,		   0,		0,
			11003, 	0,			1,		0,			0,			 0,			  0, 	 	1,		   0,		0,
			11501, 	0,			0,		0,			0,			 0,			  0, 	 	0,		   0,		0,
			11502, 	0,			0,		0,			0,			 0,			  1, 	 	0,		   0,		0,
			11503, 	0,			0,		0,			0,			 0,			  0, 	 	1,		   0,		0,
			11201, 	1,			1,		0,			0,			 0,			  0, 	 	0,		   0,		0,
			11202, 	1,			1,		0,			0,			 0,			  1, 	 	0,		   0,		0,
			11203, 	1,			1,		0,			0,			 0,			  0, 	 	1,		   0,		0,
			11701, 	1,			0,		0,			0,			 0,			  0, 	 	0,		   0,		0,
			11702, 	1,			0,		0,			0,			 0,			  1, 	 	0,		   0,		0,
			11703, 	1,			0,		0,			0,			 0,			  0, 		1,		   0,		0,
				 
			11051,	0,			1,		1,			1,			 1,			  0,	 	0,	 	   0,	 	0,	/* ZF 5HP-19 */
			11052, 	0,			1,		1,			1,			 1,			  1, 	 	0,		   0,		0,
			11053, 	0,			1,		1,			1,			 1,			  0, 	 	1,		   0,		0,
			11551, 	0,			0,		1,			1,			 1,			  0, 	 	0,		   0,		0,
			11552, 	0,			0,		1,			1,			 1,			  1, 	 	0,		   0,		0,
			11553, 	0,			0,		1,			1,			 1,			  0, 	 	1,		   0,		0,
			11251, 	1,			1,		1,			1,			 1,			  0, 	 	0,		   0,		0,
			11252, 	1,			1,		1,			1,			 1,		      1, 	 	0,		   0,		0,
			11253, 	1,			1,		1,			1,			 1,			  0, 	 	1,		   0,		0,
			11751, 	1,			0,		1,			1,			 1,			  0, 	 	0,		   0,		0,
			11752, 	1,			0,		1,			1,			 1,			  1, 	 	0,		   0,		0,
			11753, 	1,			0,		1,			1,			 1,			  0, 		1,		   0,		0,
				 
			11081,	0,			1,		2,			1,			 0,			  0,	 	0,	 	   0,	 	0,	/* CVT */
			11082, 	0,			1,		2,			1,			 0,			  1, 	 	0,		   0,		0,
			11581, 	0,			0,		2,			1,			 0,			  0, 	 	0,		   0,		0,
			11582, 	0,			0,		2,			1,			 0,			  1, 	 	0,		   0,		0,
			11281, 	1,			1,		2,			1,			 0,			  0, 	 	0,		   0,		0,
			11282, 	1,			1,		2,			1,			 0,			  1, 	 	0,		   0,		0,
			11781, 	1,			0,		2,			1,			 0,			  0, 	 	0,		   0,		0,
			11782, 	1,			0,		2,			1,			 0,			  1, 	 	0,		   0,		0,

/*TWIWAN*/	26001,	0,			1,		0,			0,			 0,			  0,	 	0,	 	   0,	 	1,	/* HS 5-Gang */
			26002, 	0,			1,		0,			0,			 0,			  1, 	 	0,		   0,		1,
			26003, 	0,			1,		0,			0,			 0,			  0, 	 	1,		   0,		1,
			26501, 	0,			0,		0,			0,			 0,			  0, 	 	0,		   0,		1,
			26502, 	0,			0,		0,			0,			 0,			  1, 	 	0,		   0,		1,
			26503, 	0,			0,		0,			0,			 0,			  0, 	 	1,		   0,		1,
			26201, 	1,			1,		0,			0,			 0,			  0, 	 	0,		   0,		1,
			26202, 	1,			1,		0,			0,			 0,			  1, 	 	0,		   0,		1,
			26203, 	1,			1,		0,			0,			 0,			  0, 	 	1,		   0,		1,
			26701, 	1,			0,		0,			0,			 0,			  0, 	 	0,		   0,		1,
			26702, 	1,			0,		0,			0,			 0,			  1, 	 	0,		   0,		1,
			26703, 	1,			0,		0,			0,			 0,			  0, 		1,		   0,		1,
				 
			26051,	0,			1,		1,			1,			 1,			  0,	 	0,	 	   0,	 	1,	/* ZF 5HP-19 */
			26052, 	0,			1,		1,			1,			 1,			  1, 	 	0,		   0,		1,
			26053, 	0,			1,		1,			1,			 1,			  0, 	 	1,		   0,		1,
			26551, 	0,			0,		1,			1,			 1,			  0, 	 	0,		   0,		1,
			26552, 	0,			0,		1,			1,			 1,			  1, 	 	0,		   0,		1,
			26553, 	0,			0,		1,			1,			 1,			  0, 	 	1,		   0,		1,
			26251, 	1,			1,		1,			1,			 1,			  0, 	 	0,		   0,		1,
			26252, 	1,			1,		1,			1,			 1,			  1, 	 	0,		   0,		1,
			26253, 	1,			1,		1,			1,			 1,			  0, 	 	1,		   0,		1,
			26751, 	1,			0,		1,			1,			 1,			  0, 	 	0,		   0,		1,
			26752, 	1,			0,		1,			1,			 1,			  1, 	 	0,		   0,		1,
			26753, 	1,			0,		1,			1,			 1,			  0, 		1,		   0,		1,
				 
			26081,	0,			1,		2,			1,			 0,			  0,	 	0,	 	   0,	 	1,	/* CVT */
			26082, 	0,			1,		2,			1,			 0,			  1, 	 	0,		   0,		1,
			26581, 	0,			0,		2,			1,			 0,			  0, 	 	0,		   0,		1,
			26582, 	0,			0,		2,			1,			 0,			  1, 	 	0,		   0,		1,
			26281, 	1,			1,		2,			1,			 0,			  0, 	 	0,		   0,		1,
			26282, 	1,			1,		2,			1,			 0,			  1, 	 	0,		   0,		1,
			26781, 	1,			0,		2,			1,			 0,			  0, 	 	0,		   0,		1,
			26782, 	1,			0,		2,			1,			 0,			  1, 	 	0,		   0,		1,

/*BRASIL*/	27001,	0,			1,		0,			0,			 0,			  0,	 	0,	 	   1,	 	0,	/* HS 5-Gang */
			27002, 	0,			1,		0,			0,			 0,			  1, 	 	0,		   1,		0,
			27003, 	0,			1,		0,			0,			 0,			  0, 	 	1,		   1,		0,
			27501, 	0,			0,		0,			0,			 0,			  0, 	 	0,		   1,		0,
			27502, 	0,			0,		0,			0,			 0,			  1, 	 	0,		   1,		0,
			27503, 	0,			0,		0,			0,			 0,			  0, 	 	1,		   1,		0,
			27201, 	1,			1,		0,			0,			 0,			  0, 	 	0,		   1,		0,
			27202, 	1,			1,		0,			0,			 0,			  1, 	 	0,		   1,		0,
			27203, 	1,			1,		0,			0,			 0,			  0, 	 	1,		   1,		0,
			27701, 	1,			0,		0,			0,			 0,			  0, 	 	0,		   1,		0,
			27702, 	1,			0,		0,			0,			 0,			  1, 	 	0,		   1,		0,
			27703, 	1,			0,		0,			0,			 0,			  0, 		1,		   1,		0,
				 
			27051,	0,			1,		1,			1,			 1,			  0,	 	0,	 	   1,	 	0,	/* ZF 5HP-19 */
			27052, 	0,			1,		1,			1,			 1,			  1, 	 	0,		   1,		0,
			27053, 	0,			1,		1,			1,			 1,			  0, 	 	1,		   1,		0,
			27551, 	0,			0,		1,			1,			 1,			  0, 	 	0,		   1,		0,
		    27552, 	0,			0,		1,			1,			 1,			  1, 	 	0,		   1,		0,
			27553, 	0,			0,		1,			1,			 1,			  0, 	 	1,		   1,		0,
			27251, 	1,			1,		1,			1,			 1,			  0, 	 	0,		   1,		0,
			27252, 	1,			1,		1,			1,			 1,			  1, 	 	0,		   1,		0,
			27253, 	1,			1,		1,			1,			 1,			  0, 	 	1,		   1,		0,
			27751, 	1,			0,		1,			1,			 1,			  0, 	 	0,		   1,		0,
			27752, 	1,			0,		1,			1,			 1,			  1, 	 	0,		   1,		0,
			27753, 	1,			0,		1,			1,			 1,			  0, 		1,		   1,		0,
				 
			27081,	0,			1,		2,			1,			 0,			  0,	 	0,	 	   1,	 	0,	/* CVT */
			27082, 	0,			1,		2,			1,			 0,			  1, 	 	0,		   1,		0,
			27581, 	0,			0,		2,			1,			 0,			  0, 	 	0,		   1,		0,
			27582, 	0,			0,		2,			1,			 0,			  1, 	 	0,		   1,		0,
			27281, 	1,			1,		2,			1,			 0,			  0, 	 	0,		   1,		0,
			27282, 	1,			1,		2,			1,			 0,			  1, 	 	0,		   1,		0,
			27781, 	1,			0,		2,			1,			 0,			  0, 	 	0,		   1,		0,
			27782, 	1,			0,		2,			1,			 0,			  1, 	 	0,		   1,		0

			};			 

/* Local Prototypes (attribute static)                                  */
/* ===================================                                  */

/* Declarations (Prototypes) of functions, only used in this module     */
void set_indexpointer(Word i);
Word get_vartabc_index(Word i);
/*{static_function_prototype...}*/

extern void	check_mirror(void);


/************************************************************************/
/*                 Global Definitions                                   */
/************************************************************************/

/* Exported RAM-Definitions                                             */
/* ========================                                             */

/* Definition of variables to be exported to other modules but not      */
/* relevant for application                                             */

/*{data_definition...}*/

/* Imported RAM-Definitions                                             */
/* ========================                                             */

/* Declaration of variables to be imported from other modules but not   */
/* relevant for application                                             */

/*{extern_data_definition...}*/

/************************************************************************/
/*                Process Definitions                                   */
/************************************************************************/

/****************************************************************
process:  get_vartabc_index
purpose:  Gibt den Wert des Variantenkodewortes zurück, das an der durch Index
			bestimmten Position in VARTABC steht  
input:	  Index
output:	  Variantenkodewort	VARTABC[i].TabPmcod
****************************************************************/

Word	get_vartabc_index(Word i)
{
	return(VARTABC[i].TabPmcod);
}

/****************************************************************
process:  set_indexpointer
purpose:  Setzt die Indexpointer mit den Werten aus VARTABC, die an 
			der durch Index gekennzeichneten Position stehen 
input:	  Index
output:	  void
****************************************************************/

void set_indexpointer(Word i)
{
	vkAntrieb 	= VARTABC[i].TabAntrieb;		 /* ## evtl. erweitern */
	vkASR 		= VARTABC[i].TabASR;		 
	vkGetriebe 	= VARTABC[i].TabGetriebe;		 
	vkGetriebe2 = VARTABC[i].TabGetriebe2;		 
	vkGetriebe3 = VARTABC[i].TabGetriebe3;		 
	vkFzgtyp 	= VARTABC[i].TabFzgtyp;		 
	vkFzgtyp2 	= VARTABC[i].TabFzgtyp2;		 
	vkAbgas 	= VARTABC[i].TabAbgas;
	vkAbgas2 	= VARTABC[i].TabAbgas2;
	vkEPC		= ( GET_B_epcden ? ZERO : ONE ); /* Set pointer for "ESKONF" acces */		 

	/* 	Folgendes Makro ist nur notwendig, wenn es Assembler-Kenngrößen
		gibt, die variantencodiert sind. Das Makro wird von DAMOS generiert.
		Die Adressen der Kenngrößen sind abhängig von vk*.
		Die Adressen der gültigen Kenngrößen, stehen nach der Ausführung
		des Makros in den RAM-Zellen ram<Kgr>. 
	*/
	SETADRASM; 								 /* ## */
}


/****************************************************************
process: var_ini
purpose: Setzen der Varianteneinstellung
****************************************************************/

void    var_ini(void)
{
	check_mirror();
}

/****************************************************************
process: var_1000ms
purpose: Setzen der Varianteneinstellung
****************************************************************/

void    var_1000ms(void)
{
	check_mirror();
}

/*{processes...}*/
