Is it possible to read the value of a lwevent?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Is it possible to read the value of a lwevent?

ソリューションへジャンプ
1,219件の閲覧回数
JaimeR
Contributor III

If yes,  how? and would I need extra protection to avoid accessing the value of the event at the same time by different tasks?

 

Regards,

0 件の賞賛
返信
1 解決策
616件の閲覧回数
JuroV
NXP Employee
NXP Employee

First of all, reading value of any synchronization object (e.g. lwevent) is not task-safe and handling with those objects should be done only through blocking / setting functions.

To fulfill your request, I reply that if you want to read value of lwevent, use:

 

LWEVENT_STRUCT some_event;

/* some initialization code here, out of scope */

_mqx_uint lwe_val = some_event.VALUE;

 

 

 

Message Edited by JuroV on 2009-10-05 10:17 AM

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
617件の閲覧回数
JuroV
NXP Employee
NXP Employee

First of all, reading value of any synchronization object (e.g. lwevent) is not task-safe and handling with those objects should be done only through blocking / setting functions.

To fulfill your request, I reply that if you want to read value of lwevent, use:

 

LWEVENT_STRUCT some_event;

/* some initialization code here, out of scope */

_mqx_uint lwe_val = some_event.VALUE;

 

 

 

Message Edited by JuroV on 2009-10-05 10:17 AM
0 件の賞賛
返信