
/**************************************************************** 
* WARNING: This file is automatically generated. DO NOT EDIT IT!
*
* COPYRIGHT (c) Freescale 2004-2014, All Rights Reserved
*
* FILE NAME: etpu_spark.h
* ARCHITECTURE: eTPU2
*
* This file was generated by: etpuc_spark.c on Dec  2 2015 , 13:47:35
*
* This file provides an interface between eTPU code and CPU
* code. All references to the eTPU function should be made with
* information in this file. This allows only symbolic
* information to be referenced which allows the eTPU code to be
* optimized without effecting the CPU code.
*****************************************************************/
#ifndef _ETPU_SPARK_AUTO_H_
#define _ETPU_SPARK_AUTO_H_

/* Function Configuration Information */
#define FS_ETPU_SPARK_FUNCTION_NUMBER 6
#define FS_ETPU_SPARK_TABLE_SELECT 1
#define FS_ETPU_SPARK_NUM_PARMS 0x38


/* Host Service Request Definitions */
#define FS_ETPU_SPARK_HSR_INIT 7
#define FS_ETPU_SPARK_HSR_UPDATE 3

/* Function Mode Bit Definitions */
#define FS_ETPU_SPARK_FM0_ACTIVE_LOW 0
#define FS_ETPU_SPARK_FM0_ACTIVE_HIGH 1

/* Parameter Definitions */
#define FS_ETPU_SPARK_OFFSET_TDC_ANGLE  0x1
#define FS_ETPU_SPARK_OFFSET_TDC_ANGLE_ACTUAL  0x5
#define FS_ETPU_SPARK_OFFSET_ANGLE_OFFSET_RECALC  0x9
#define FS_ETPU_SPARK_OFFSET_DWELL_TIME_MIN  0xd
#define FS_ETPU_SPARK_OFFSET_DWELL_TIME_MAX  0x11
#define FS_ETPU_SPARK_OFFSET_MULTI_ON_TIME  0x15
#define FS_ETPU_SPARK_OFFSET_MULTI_OFF_TIME  0x19
#define FS_ETPU_SPARK_OFFSET_P_SINGLE_SPARK_FIRST  0x1d
#define FS_ETPU_SPARK_OFFSET_P_SINGLE_SPARK  0x21
#define FS_ETPU_SPARK_OFFSET_PULSE_START_TIME  0x25
#define FS_ETPU_SPARK_OFFSET_DWELL_TIME_APPLIED  0x29
#define FS_ETPU_SPARK_OFFSET_DWELL_TIME  0x2d
#define FS_ETPU_SPARK_OFFSET_END_ANGLE  0x31
#define FS_ETPU_SPARK_OFFSET_SPARK_COUNT  0x0
#define FS_ETPU_SPARK_OFFSET_SPARK_COUNTER  0x4
#define FS_ETPU_SPARK_OFFSET_MULTI_PULSE_COUNT  0x8
#define FS_ETPU_SPARK_OFFSET_MULTI_PULSE_COUNTER  0xc
#define FS_ETPU_SPARK_OFFSET_STATE  0x10
#define FS_ETPU_SPARK_OFFSET_ERROR  0x14
#define FS_ETPU_SPARK_OFFSET_GENERATION_DISABLE  0x18

/* Error Flags Definitions */
#define FS_ETPU_SPARK_ERROR_MIN_DWELL_APPLIED 0x01
#define FS_ETPU_SPARK_ERROR_MAX_DWELL_APPLIED 0x02

/* Generation Disable Definitions */
#define FS_ETPU_SPARK_GENERATION_ALLOWED 0
#define FS_ETPU_SPARK_GENERATION_DISABLED 1

/* Spark Structure Definitions */
#define FS_ETPU_SINGLE_SPARK_OFFSET_MULTI_PULSE_COUNT 0x00
#define FS_ETPU_SINGLE_SPARK_OFFSET_END_ANGLE 0x01
#define FS_ETPU_SINGLE_SPARK_OFFSET_DWELL_TIME 0x05
#define FS_ETPU_SINGLE_SPARK_STRUCT_SIZE 0x08

#endif
