/* Return PWM channel number according to pin name.  */
u32 pwmout_pin2chan(PinName pin)
/* Return PWM channel number according to pin name.  */
u32 pwmout_pin2chan(PinName pin)
{
	int i = 0;
	for(;i < 19;i++){
		if(pin2chan[i][0] == pin){
			return (pin2chan[i][2] | BIT_PWM_TIM_IDX_FLAG);
		}
	}
	return NC;
}