Checking for data availability in a channel?

New to XMOS and XCore? Get started here.
Active Member
Posts: 38
Joined: Thu Mar 21, 2013 11:18 am

Checking for data availability in a channel?

Postby Treczoks » Tue Jun 11, 2013 10:57 am


I've got a chanend where data might come to. Might. So I could use something like this:

Code: Select all

select {
  case MyChan :> Data:
    DataReceived = 1;
    DataReceived = 0;
This strikes me as being a bit bulky - is there no simple way just to ask a chanend if there is something available?

Yours, Christian Treczoks
User avatar
XCore Expert
Posts: 768
Joined: Thu Dec 10, 2009 9:20 pm

Postby Ross » Sun Sep 08, 2013 6:28 pm

This would be the recommended way.

Who is online

Users browsing this forum: No registered users and 0 guests