MQX Lite task stub

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

MQX Lite task stub

Jump to solution
581 Views
carloscuev
Contributor V

Hi, I'm starting to use MQX Lite and I'm noticing that it creates a stub with a int counter; and a counter++; line like this:

MQX Lite.png

The questions are: Is it really needed? Why does it instruct to write our code after the counter++? Is it ok if I remove it?

I've removed it and my LedTask still works fine, is there any warning on doing so?

Thanks.

0 Kudos
1 Solution
484 Views
RadekS
NXP Employee
NXP Employee

No, it is not needed.

It is just example code.

You can delete it or modify.....

In fact endless while loop is also just typical example code, you can use any other approach.

Variable “counter” could be sometimes used for debugging purposes – for test whether task something does (however you have LED output, so it is duplicity information)….

View solution in original post

0 Kudos
2 Replies
485 Views
RadekS
NXP Employee
NXP Employee

No, it is not needed.

It is just example code.

You can delete it or modify.....

In fact endless while loop is also just typical example code, you can use any other approach.

Variable “counter” could be sometimes used for debugging purposes – for test whether task something does (however you have LED output, so it is duplicity information)….

0 Kudos
484 Views
carloscuev
Contributor V

Great, thanks!

0 Kudos