PhAB

我用PhAB設計了一個顯示界面﹐然後用數據採集卡採集數據﹐用定時中斷的方式採集數據﹐我的問題是﹕在中斷服務程序裡(或者thead裡)不能去讀寫Widget的全局變量ABW_xx﹐為什麼﹖請各位大俠幫忙。謝謝﹗

看看这个。

http://www.qnx.com/developers/docs/6.3.0SP3/photon/prog_guide/lengthy.html#Threads

Thank you, xTang

I actually have another thread to deal with data collected from the hardware, the ISR only returns an INTR event to unblock InterruptWait(). therefore my problem seems like somehting about one thread try to access PhAB resources, other than real time ISR, is it right?

Right, that’s why I suggest you read the “Photon and Multi-thread” document. It also told you how to deal with it.

我也碰到了这个问题。我是在phab的一个按键的callback中创建了一个thread,用来专门接收数据,当这个按键按下之后,就进入死循环一直接收数据,而且要允许其他的按键能继续工作。这个thread用来做和Widget不相干的事情是没有问题的,但是我要让这写数据显示在pttext上,不知道如何处理了。。。

如果用PtEnter和Ptleave的话,倒是能显示,但在这个过程中其他键都被block了。。。。。

有没有什么办法??谢谢各位。。

用timeout解决了block的问题。。。要学的东西还很多啊。。。总是有知其然而不知其所以然的感觉啊