
/**************************************************************** 
* WARNING: This file is automatically generated. DO NOT EDIT IT!
*
* COPYRIGHT (c) Freescale 2004-2014, All Rights Reserved
*
* FILE NAME: etpu_inj_auto.h
* ARCHITECTURE: eTPU
*
* This file was generated by: etpuc_inj.c on Dec  2 2015 , 13:46:38
*
* 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_INJ_AUTO_H_
#define _ETPU_INJ_AUTO_H_

/* Function Configuration Information */
#define FS_ETPU_INJ_FUNCTION_NUMBER 4
#define FS_ETPU_INJ_TABLE_SELECT 1
#define FS_ETPU_INJ_NUM_PARMS 0x28


/* Host Service Request Definitions */
#define FS_ETPU_INJ_HSR_INIT 7
#define FS_ETPU_INJ_HSR_UPDATE 3
#define FS_ETPU_INJ_HSR_STOP 5

/* Function Mode Bit Definitions */
#define FS_ETPU_INJ_FM0_ACTIVE_HIGH (0 )
#define FS_ETPU_INJ_FM0_ACTIVE_LOW (1 )
#define FS_ETPU_INJ_FM1_CHANNEL_INJ ((0 <<1))
#define FS_ETPU_INJ_FM1_CHANNEL_BANK ((1 <<1))

/* Parameter Definitions */
#define FS_ETPU_INJ_OFFSET_INJECTION_COUNT 0x0
#define FS_ETPU_INJ_OFFSET_INJECTION_COUNTER 0x4
#define FS_ETPU_INJ_OFFSET_PHASE_COUNTER 0x8
#define FS_ETPU_INJ_OFFSET_ERROR 0x14
#define FS_ETPU_INJ_OFFSET_INACTIVE_POLARITIES 0x18
#define FS_ETPU_INJ_OFFSET_BANK_CHANS_COUNT 0xc
#define FS_ETPU_INJ_OFFSET_BANK_CHANS 0xd
#define FS_ETPU_INJ_OFFSET_BANK_CHANS_MASK 0x10
#define FS_ETPU_INJ_OFFSET_P_INJECTION_FIRST 0x1
#define FS_ETPU_INJ_OFFSET_P_INJECTION 0x5
#define FS_ETPU_INJ_OFFSET_P_PHASE 0x9
#define FS_ETPU_INJ_OFFSET_ANGLE_IRQ 0x15
#define FS_ETPU_INJ_OFFSET_ANGLE_STOP 0x19
#define FS_ETPU_INJ_OFFSET_TDC_ANGLE 0x1d
#define FS_ETPU_INJ_OFFSET_TDC_ANGLE_ACTUAL 0x21

/* Global Variable Definitions */
#define FS_ETPU_INJ_OFFSET_ACTIVE_BANK_CHANS 0x60

/* Injection Structure Definitions */
#define FS_ETPU_INJ_OFFSET_PHASE_COUNT 0x00
#define FS_ETPU_INJ_OFFSET_P_PHASE_FIRST 0x01
#define FS_ETPU_INJ_OFFSET_ANGLE_START 0x05

/* Phase Structure Definitions */
#define FS_ETPU_INJ_OFFSET_DMAS_OUTPUTS 0x00
#define FS_ETPU_INJ_OFFSET_DURATION 0x01

/* Value Definitions */
#define FS_ETPU_INJ_INJECTION_STRUCT_SIZE 0x08
#define FS_ETPU_INJ_PHASE_STRUCT_SIZE 0x04

/* Error Flags Definitions */
#define FS_ETPU_INJ_ERROR_PREV_INJ_NOT_FINISHED 0x01
#define FS_ETPU_INJ_ERROR_LATE_START_ANGLE_1ST 0x02
#define FS_ETPU_INJ_ERROR_LATE_START_ANGLE_NTH 0x04
#define FS_ETPU_INJ_ERROR_STOPPED_BY_STOP_ANGLE 0x08

#endif
