/* \method period() Get or set the period of the timer.  */
STATIC mp_obj_t pyb_timer_period(size_t n_args, const mp_obj_t *args)
/* \method period() Get or set the period of the timer.  */
STATIC mp_obj_t pyb_timer_period(size_t n_args, const mp_obj_t *args)
{
        return mp_obj_new_int(__HAL_TIM_GET_AUTORELOAD(&self->tim) & TIMER_CNT_MASK(self));
    } else {
        __HAL_TIM_SET_AUTORELOAD(&self->tim, mp_obj_get_int(args[1]) & TIMER_CNT_MASK(self));
        return mp_const_none;
    }
}