/* \method counter() Get or set the timer counter.  */
STATIC mp_obj_t pyb_timer_counter(size_t n_args, const mp_obj_t *args)
/* \method counter() Get or set the timer counter.  */
STATIC mp_obj_t pyb_timer_counter(size_t n_args, const mp_obj_t *args)
{
        return mp_obj_new_int(self->tim.Instance->CNT);
    } else {
        __HAL_TIM_SET_COUNTER(&self->tim, mp_obj_get_int(args[1]));
        return mp_const_none;
    }
}