/* Disable the corresponding pwm output channel to stop the DC motor.  */
void AMSDCMotorStop(unsigned long ulMotor)
/* Disable the corresponding pwm output channel to stop the DC motor.  */
void AMSDCMotorStop(unsigned long ulMotor)
{
    xASSERT((ulMotor == AMS_MOTOR_A) ||
	        (ulMotor == AMS_MOTOR_B));
    if(ulMotor == AMS_MOTOR_A)
	{
    	xPWMStop(sPWMB_BASE, xPWM_CHANNEL0);
    	xGPIOSPinWrite(sD9,1);
	}
	else if(ulMotor == AMS_MOTOR_B)
	{
		xPWMStop(sPWMA_BASE, xPWM_CHANNEL2);
		xGPIOSPinWrite(sD8,1);
	}
}