#include "F2837xD_device.h"
#include "F2837xD_Examples.h"
#include "F2837xD_GlobalPrototypes.h"
#include "rtwtypes.h"
#include "Inverter_000_test.h"
#include "Inverter_000_test_private.h"

void config_ePWM_GPIO (void)
{
  EALLOW;
  ClkCfgRegs.PERCLKDIVSEL.bit.EPWMCLKDIV = 1;

  /*-- Configure pin assignments for ePWM5 --*/
  GpioCtrlRegs.GPAGMUX1.bit.GPIO8 = 0;
  GpioCtrlRegs.GPAMUX1.bit.GPIO8 = 1;  /* Configure GPIOGPIO8 as EPWM5A*/
  GpioCtrlRegs.GPAGMUX1.bit.GPIO9 = 0;
  GpioCtrlRegs.GPAMUX1.bit.GPIO9 = 1;  /* Configure GPIOGPIO9 as EPWM5B*/

  /*-- Configure pin assignments for ePWM3 --*/
  GpioCtrlRegs.GPAGMUX1.bit.GPIO4 = 0;
  GpioCtrlRegs.GPAMUX1.bit.GPIO4 = 1;  /* Configure GPIOGPIO4 as EPWM3A*/
  GpioCtrlRegs.GPAGMUX1.bit.GPIO5 = 0;
  GpioCtrlRegs.GPAMUX1.bit.GPIO5 = 1;  /* Configure GPIOGPIO5 as EPWM3B*/

  /*-- Configure pin assignments for ePWM6 --*/
  GpioCtrlRegs.GPAGMUX1.bit.GPIO10 = 0;
  GpioCtrlRegs.GPAMUX1.bit.GPIO10 = 1; /* Configure GPIOGPIO10 as EPWM6A*/
  GpioCtrlRegs.GPAGMUX1.bit.GPIO11 = 0;
  GpioCtrlRegs.GPAMUX1.bit.GPIO11 = 1; /* Configure GPIOGPIO11 as EPWM6B*/

  /*-- Configure pin assignments for ePWM4 --*/
  GpioCtrlRegs.GPAGMUX1.bit.GPIO6 = 0;
  GpioCtrlRegs.GPAMUX1.bit.GPIO6 = 1;  /* Configure GPIOGPIO6 as EPWM4A*/
  GpioCtrlRegs.GPAGMUX1.bit.GPIO7 = 0;
  GpioCtrlRegs.GPAMUX1.bit.GPIO7 = 1;  /* Configure GPIOGPIO7 as EPWM4B*/

  /*--- Configure pin assignments for TZn ---*/
  EDIS;
}
