MQX Lite task stub

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,378件の閲覧回数
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 件の賞賛
返信
1 解決策
1,281件の閲覧回数
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 件の賞賛
返信
2 返答(返信)
1,282件の閲覧回数
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 件の賞賛
返信
1,281件の閲覧回数
carloscuev
Contributor V

Great, thanks!

0 件の賞賛
返信