/**************************** (C) COPYRIGHT 2017 Fortiortech shenzhen *****************************
* File Name          : Customer.h
* Author             : Vina Peng, Fortiortech Appliction Team
* Version            : V1.0
* Date               : 2017-12-21
* Description        : This file contains all the common data types used for
*                      Motor Control.
***************************************************************************************************
* All Rights Reserved
**************************************************************************************************/

/* Define to prevent recursive inclusion --------------------------------------------------------*/
#ifndef __CUSTOMER_H_
#define __CUSTOMER_H_

#define I_ValueX(Curr_Value)            (Curr_Value * HW_RSHUNT * HW_AMPGAIN / HW_ADC_REF)
#define I_Value(Curr_Value)             _Q15(I_ValueX(Curr_Value))
/*芯片参数值-------------------------------------------------------------------*/
 /*CPU and PWM Parameter*/
 #define MCU_CLOCK                      (1.5)                                  // (MHz) 主频
 #define PWM_FREQUENCY                  (20.0)                                  // (kHz) 载波频率
/*******TIMER3PWM配置***/
 #define PwmCapture                      (0)                                    // PWM捕获 
 #define PwmOutput                       (1)                                    // PWM输出
 #define PwmLevelOutput                  (2)                                    // PWM输出高低电平
 #define PwmModeChoose                   (PwmLevelOutput)                                     // PWM模式选择
 #define PwmOutputDuty                   (50)    
#endif
