
/****************************************************************
* WARNING this file is automatically generated DO NOT EDIT IT!   
*                                                                
* This file provides an interface between eTPU code and CPU      
* code. All references to the QD, QDHOME and QDINDEX functions   
* 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 _FS_ETPU_QD_AUTO_H_
#define _FS_ETPU_QD_AUTO_H_

/****************************************************************
* Function Configuration Information.
****************************************************************/
#define FS_ETPU_QD_FUNCTION_NUMBER       3 
#define FS_ETPU_QD_TABLE_SELECT          1 
#define FS_ETPU_QD_NUM_PARMS             0x0040 

#define FS_ETPU_QD_HOME_FUNCTION_NUMBER  4 
#define FS_ETPU_QD_HOME_TABLE_SELECT     0 
#define FS_ETPU_QD_HOME_NUM_PARMS        0x0040 

#define FS_ETPU_QD_INDEX_FUNCTION_NUMBER 5 
#define FS_ETPU_QD_INDEX_TABLE_SELECT    0 
#define FS_ETPU_QD_INDEX_NUM_PARMS       0x0040 

/****************************************************************
* Host Service Request Definitions.
****************************************************************/
#define FS_ETPU_QD_INIT       1 
#define FS_ETPU_QD_HOME_INIT  1 
#define FS_ETPU_QD_INDEX_INIT 1 

/****************************************************************
* Parameter Definitions.
****************************************************************/
#define FS_ETPU_QD_PC_OFFSET                   0x0001
#define FS_ETPU_QD_RC_OFFSET                   0x0005
#define FS_ETPU_QD_PERIOD_OFFSET               0x0009
#define FS_ETPU_QD_PCMAX_OFFSET                0x000D
#define FS_ETPU_QD_PCINTERRUPT1_OFFSET         0x0011
#define FS_ETPU_QD_PCINTERRUPT2_OFFSET         0x0015
#define FS_ETPU_QD_SLOW_NORMAL_THR_OFFSET      0x0019
#define FS_ETPU_QD_NORMAL_SLOW_THR_OFFSET      0x001D
#define FS_ETPU_QD_NORMAL_FAST_THR_OFFSET      0x0021
#define FS_ETPU_QD_FAST_NORMAL_THR_OFFSET      0x0025
#define FS_ETPU_QD_LAST_LEADING_EDGE_OFFSET    0x0029
#define FS_ETPU_QD_LAST_EDGE_OFFSET            0x002D
#define FS_ETPU_QD_PC_SC_OFFSET                0x0031
#define FS_ETPU_QD_DIRECTION_OFFSET            0x0000
#define FS_ETPU_QD_LAST_DIRECTION_OFFSET       0x0004
#define FS_ETPU_QD_PINS_OFFSET                 0x0008
#define FS_ETPU_QD_MODE_CURRENT_OFFSET         0x000C
#define FS_ETPU_QD_OPTIONS_OFFSET              0x0010
#define FS_ETPU_QD_RATIO1_OFFSET               0x0035
#define FS_ETPU_QD_RATIO2_OFFSET               0x0039

/****************************************************************
* Value Definitions.
****************************************************************/
#define FS_ETPU_QD_FM_CHANNEL_PRIMARY         0
#define FS_ETPU_QD_FM_CHANNEL_SECONDARY       1

#define FS_ETPU_QD_HOME_FM_DETECT_LOW_HIGH    0
#define FS_ETPU_QD_HOME_FM_DETECT_HIGH_LOW    1
#define FS_ETPU_QD_HOME_FM_DETECT_ANY         2

#define FS_ETPU_QD_INDEX_FM_PULSE_POSITIVE    0
#define FS_ETPU_QD_INDEX_FM_PULSE_NEGATIVE    1
#define FS_ETPU_QD_INDEX_FM_PC_NO_RESET       0
#define FS_ETPU_QD_INDEX_FM_PC_RESET          2

/* option bits */
#define FS_ETPU_QD_PC_MAX_ENABLED             1 
#define FS_ETPU_QD_PC_INTERRUPT_ENABLED       2 
#define FS_ETPU_QD_WINDOWING_DISABLED         4 

/* pins bits */
#define FS_ETPU_QD_PINS_PIN_A                 1 
#define FS_ETPU_QD_PINS_PIN_B                 2 
#define FS_ETPU_QD_PINS_CONFIGURATION         4 

#endif
