/* Set the pulse width of the specified channel in microseconds.  */
void pwmout_pulsewidth_us(pwmout_t *obj, int us)
/* Set the pulse width of the specified channel in microseconds.  */
void pwmout_pulsewidth_us(pwmout_t *obj, int us)
{
	u32 ccrx;
	obj->pulse = (float)us;
	ccrx = (u32)(obj->pulse  * 40 / (prescaler + 1)) & 0x0000ffff;
	RTIM_CCRxSet(PWM_TIM[obj->pwm_idx >>BIT_PWM_TIM_IDX_SHIFT], ccrx, obj->pwm_idx & (~BIT_PWM_TIM_IDX_FLAG)); 
}