You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Sara da Cunha Monteiro de Souza <sa...@gmail.com> on 2021/04/07 21:32:27 UTC
Why _freerun_initialize() inits running variable as false?
Hi all,
I've been implementing the freerun wrapper and I took a look at
the multiple implementations in other chips and I realized that
they initialize the running variable as false in their respective
<chip>_freerun_initialize() function.
I can't understand. It should be true, shouldn't it? Because this
function starts the counter.
What am I missing? 🤔
Best,
Sara
Re: Why _freerun_initialize() inits running variable as false?
Posted by Sara da Cunha Monteiro de Souza <sa...@gmail.com>.
Thanks Mr Nutt.
Em qua., 7 de abr. de 2021 Ã s 19:31, Gregory Nutt <sp...@gmail.com>
escreveu:
> PR #3476 removes the unused variable from all other architectures.
>
> On 4/7/2021 3:59 PM, Sara da Cunha Monteiro de Souza wrote:
> > Yes, I agree.
> >
> > Because I took a look at some codes that
> > are using the freerun driver (tickless, dhtxx and hcsr)
> > and no one use this var.
> >
> > I think I will "deviate", save some bytes and not create it.
> >
> > Em qua., 7 de abr. de 2021 Ã s 18:53, Alan Carvalho de Assis <
> > acassis@gmail.com> escreveu:
> >
> >> Hi Sara,
> >>
> >> Good question, I think the "running" variable is not used. Probably it
> >> is a new living being that evolved from the oneshot timer driver where
> >> the "running" makes sense to exist. :-D
> >>
> >> BR,
> >>
> >> Alan
> >>
> >> On 4/7/21, Sara da Cunha Monteiro de Souza
> >> <sa...@gmail.com> wrote:
> >>> Hi all,
> >>>
> >>> I've been implementing the freerun wrapper and I took a look at
> >>> the multiple implementations in other chips and I realized that
> >>> they initialize the running variable as false in their respective
> >>> <chip>_freerun_initialize() function.
> >>>
> >>> I can't understand. It should be true, shouldn't it? Because this
> >>> function starts the counter.
> >>>
> >>> What am I missing? 🤔
> >>>
> >>> Best,
> >>>
> >>> Sara
> >>>
>
Re: Why _freerun_initialize() inits running variable as false?
Posted by Gregory Nutt <sp...@gmail.com>.
PR #3476 removes the unused variable from all other architectures.
On 4/7/2021 3:59 PM, Sara da Cunha Monteiro de Souza wrote:
> Yes, I agree.
>
> Because I took a look at some codes that
> are using the freerun driver (tickless, dhtxx and hcsr)
> and no one use this var.
>
> I think I will "deviate", save some bytes and not create it.
>
> Em qua., 7 de abr. de 2021 Ã s 18:53, Alan Carvalho de Assis <
> acassis@gmail.com> escreveu:
>
>> Hi Sara,
>>
>> Good question, I think the "running" variable is not used. Probably it
>> is a new living being that evolved from the oneshot timer driver where
>> the "running" makes sense to exist. :-D
>>
>> BR,
>>
>> Alan
>>
>> On 4/7/21, Sara da Cunha Monteiro de Souza
>> <sa...@gmail.com> wrote:
>>> Hi all,
>>>
>>> I've been implementing the freerun wrapper and I took a look at
>>> the multiple implementations in other chips and I realized that
>>> they initialize the running variable as false in their respective
>>> <chip>_freerun_initialize() function.
>>>
>>> I can't understand. It should be true, shouldn't it? Because this
>>> function starts the counter.
>>>
>>> What am I missing? 🤔
>>>
>>> Best,
>>>
>>> Sara
>>>
Re: Why _freerun_initialize() inits running variable as false?
Posted by Sara da Cunha Monteiro de Souza <sa...@gmail.com>.
Yes, I agree.
Because I took a look at some codes that
are using the freerun driver (tickless, dhtxx and hcsr)
and no one use this var.
I think I will "deviate", save some bytes and not create it.
Em qua., 7 de abr. de 2021 Ã s 18:53, Alan Carvalho de Assis <
acassis@gmail.com> escreveu:
> Hi Sara,
>
> Good question, I think the "running" variable is not used. Probably it
> is a new living being that evolved from the oneshot timer driver where
> the "running" makes sense to exist. :-D
>
> BR,
>
> Alan
>
> On 4/7/21, Sara da Cunha Monteiro de Souza
> <sa...@gmail.com> wrote:
> > Hi all,
> >
> > I've been implementing the freerun wrapper and I took a look at
> > the multiple implementations in other chips and I realized that
> > they initialize the running variable as false in their respective
> > <chip>_freerun_initialize() function.
> >
> > I can't understand. It should be true, shouldn't it? Because this
> > function starts the counter.
> >
> > What am I missing? 🤔
> >
> > Best,
> >
> > Sara
> >
>
Re: Why _freerun_initialize() inits running variable as false?
Posted by Alan Carvalho de Assis <ac...@gmail.com>.
Hi Sara,
Good question, I think the "running" variable is not used. Probably it
is a new living being that evolved from the oneshot timer driver where
the "running" makes sense to exist. :-D
BR,
Alan
On 4/7/21, Sara da Cunha Monteiro de Souza
<sa...@gmail.com> wrote:
> Hi all,
>
> I've been implementing the freerun wrapper and I took a look at
> the multiple implementations in other chips and I realized that
> they initialize the running variable as false in their respective
> <chip>_freerun_initialize() function.
>
> I can't understand. It should be true, shouldn't it? Because this
> function starts the counter.
>
> What am I missing? 🤔
>
> Best,
>
> Sara
>