/*
 * Function_define_WW_HFB.h
 *
 *  Created on: Apr 21, 2019
 *      Author: weizhong
 */

#ifndef FUNCTION_DEFINE_LONGMAX_28379D_H_
#define FUNCTION_DEFINE_LONGMAX_28379D_H_

#if      HR_EN
#include "SFO_V8.h"
#endif
//..............................Function_define_WW_HFB.c Defines...........................................

#if CPU_FRQ_200MHZ
#define SPI_BRR        ((200E6 / 4) / 500E3) - 1
#endif

#if CPU_FRQ_150MHZ
#define SPI_BRR        ((150E6 / 4) / 500E3) - 1
#endif

#if CPU_FRQ_120MHZ
#define SPI_BRR        ((120E6 / 4) / 500E3) - 1
#endif

// DAC defines
#define REFERENCE_VDAC      0
#define REFERENCE_VREF      1
#define DACA                1
#define DACB                2
#define DACC                3
#define REFERENCE           REFERENCE_VREF
#define DAC_NUM             DACB
#define AUTOCONVERT         1                   // Enable the auto conversion for HRPWM
#define PWM_CH              13
#define SPI_CH              3
volatile struct DAC_REGS* DAC_PTR[4] = {0x0,&DacaRegs,&DacbRegs,&DaccRegs};
volatile struct EPWM_REGS* ePWM[PWM_CH] =
            {
             &EPwm1Regs, &EPwm1Regs, &EPwm2Regs, &EPwm3Regs, &EPwm4Regs,
             &EPwm5Regs, &EPwm6Regs, &EPwm7Regs, &EPwm8Regs, &EPwm9Regs,
             &EPwm10Regs, &EPwm11Regs, &EPwm12Regs
            };

volatile struct SPI_REGS* SPIs[SPI_CH] =
            {
             &SpiaRegs, &SpibRegs, &SpicRegs
            };





#endif /* DEBUG_FUNCTION_DEFINE_WW_HFB_H_ */
