/* convert raw pulse length expressed in timer ticks to protocol bit times  */
static uint8_t rc5_get_pulse_length(uint16_t pulse_length)
/* convert raw pulse length expressed in timer ticks to protocol bit times  */
static uint8_t rc5_get_pulse_length(uint16_t pulse_length)
{
    if((pulse_length > rc5_mint) && (pulse_length < rc5_maxt)){
        return (RC5_1T_TIME);    
    }else if((pulse_length > rc5_min2t) && (pulse_length < rc5_max2t)){
        return (RC5_2T_TIME);
    }
    return RC5_WRONG_TIME;
}