#include "MDRFxx_SFR.h"
#include "main.h"
#include "IPD.h"
#include "OCP.h"

unsigned char IPDPattern = 0;

#define IAE_SOFT 0x02

#define IAES 0x00
#define IAEPS 0x00
#define IAEPNS 0x08
#define IAEEN 0x01

//void IPD_Init (void)
//{
//	//MOTOR_CONT2 |= IAE_SOFT;
//	AOCPCONT = IPD_LEVEL;
//	INI_ANG_CTRL = IAEPS | IAEPNS | IAECYC | IAEEN;
//	while((INI_ANG_CTRL & 0x80) == 0x80);
//	IPDPattern = (INI_ANG_CTRL & 0x70)>>4;
//	AOCPCONT = AOCPCONT_REGS;
//	OCPCONT = OCPCONT_REGS | OCPC;
//}
