_lwevent_wait_for _ticks _ untill what is the difference ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

_lwevent_wait_for _ticks _ untill what is the difference ?

2,309 Views
PO220
Contributor IV

Hi

I'm using MQX lite on a KL15 and and I trying to use lwevents.

I do not understand the difference between

_lwevent_wait_for

_lwevent_wait_ticks

_lwevent_wait_untill

wainting for " the number of ticks (in tick time)", "the number of ticks (whithout 'in' tick time')

or wainting until the specified time (in tick time)

is not it the same thing ?

Thank you in advance to explain to me the difference in "beginner language"

Maybe one of these functions is less resource intensive ?

0 Kudos
3 Replies

677 Views
soledad
NXP Employee
NXP Employee

Yes, basically both are the same thing, my best way to tell you it is like While and Do_while, in the first  one While you first ask for the condition and then you do and in the case of  Do_while you first do and then ask for the condition of time, so   lwevent_until it is basically the same as the while and the lwevent_for it is the do_while I hope this clarify.

Have a nice day!

Regards

Sol

677 Views
PO220
Contributor IV

thank you

but I never succed to use events (often in hard fault) . Now I use simple flags with time delay.

0 Kudos

677 Views
soledad
NXP Employee
NXP Employee

Hello,

Attached you can find an example guide, may this helps.

Have a nice day!!

Regards

Sol

0 Kudos