/* Init the ADC of the motor shield for current get.  */
unsigned long AMSMotorCurrentGet(unsigned long ulMotor)
/* Init the ADC of the motor shield for current get.  */
unsigned long AMSMotorCurrentGet(unsigned long ulMotor)
{
	unsigned long ulCurrentADCData;
    xASSERT((ulBase == AMS_MOTOR_A) ||
	        (ulBase == AMS_MOTOR_B));
    if(ulMotor == AMS_MOTOR_A)
	{
    	ulCurrentADCData = ADCDataInjectedGet(sADC_BASE, 1) & 0xFFF;
	}
	else if(ulMotor == AMS_MOTOR_B)
	{
		ulCurrentADCData = ADCDataInjectedGet(sADC_BASE, 2) & 0xFFF;
	}
    ulCurrentADCData = ulCurrentADCData *2000;
    ulCurrentADCData = ulCurrentADCData >> 12;
}