C51 COMPILER V9.52.0.0   DRIVERINIT                                                        10/08/2018 09:39:57 PAGE 1   


C51 COMPILER V9.52.0.0, COMPILATION OF MODULE DRIVERINIT
OBJECT MODULE PLACED IN .\Output\DriverInit.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE ..\User\Source\Hardware\DriverInit.c LARGE OMF2 WARNINGLEVEL(0) BROWSE INCD
                    -IR(..\Library\FU68xx_Hardware_Driver\Include;..\User\Include) DEBUG PRINT(.\Listing\DriverInit.lst) TABS(2) OBJECT(.\Out
                    -put\DriverInit.obj)

line level    source

   1          /**************************** (C) COPYRIGHT 2017 Fortiortech shenzhen *****************************
   2          * File Name          : DriverInit.c
   3          * Author             : Vina Peng,Fortiortech  Appliction Team
   4          * Version            : V1.0
   5          * Date               : 10-Apr-2017
   6          * Description        : This file contains driver initial function used for Motor Control.
   7          ***************************************************************************************************
   8          * All Rights Reserved
   9          **************************************************************************************************/
  10          
  11          
  12          /* Includes -------------------------------------------------------------------------------------*/
  13          #include <FU68xx_2.h>
  14          #include <Myproject.h>
  15          
  16          
  17          /*-------------------------------------------------------------------------------------------------
  18            Function Name : void Driver_Init(void)
  19            Description   : Driver初始化配置
  20            Input         : 无
  21            Output        : 无
  22          -------------------------------------------------------------------------------------------------*/
  23          void Driver_Init(void)
  24          {   
  25   1        DRV_CR   = 0xAD;                     //DRV_CR寄存器配置
  26   1        DRV_SR   = 0x00;                     //DRV_SR寄存器配置
  27   1        DRV_OUT  = 0x3F;                     //输出使能配置
  28   1        DRV_CMR  = 0xFFFF;                   //有效电平配置
  29   1        DRV_COMR = PWM_VALUE_LOAD >> 1;      //计数器的比较匹配值
  30   1        DRV_ARR  = PWM_VALUE_LOAD;           //PWM周期配置
  31   1        DRV_DR   = 0x00;                     //软件写PWM占空比
  32   1        DRV_DTR  = PWM_LOAD_DEADTIME;        //死区时间配置
  33   1        
  34   1        SetBit(PH_SEL,XOE);                  //X通道IO口输出使能
  35   1      }
  36          
  37          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =     63    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
   EDATA SIZE       =   ----    ----
   HDATA SIZE       =   ----    ----
   XDATA CONST SIZE =   ----    ----
   FAR CONST SIZE   =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)
