Passing xc types such as chanends through C calling stack

If you have a simple question and just want an answer.
User avatar
tuck1s
Active Member
Posts: 32
Joined: Thu Sep 25, 2014 1:19 am

Passing xc types such as chanends through C calling stack

Post by tuck1s »

I think it's OK to have functions call each other such as

A function in toplevel.xc, calls a function in midlle.c, which calls a function in driver.xc

(The sc_sdcard module is an example of this).

But is it possible to pass data types such as streaming chanend's as parameters?  The C code would of course not be able to do anything with such parameters, but if they can be passed on down to .xc that would be very useful (e.g. doing streamed I/O rather than byte arrays).

 

User avatar
tuck1s
Active Member
Posts: 32
Joined: Thu Sep 25, 2014 1:19 am

Post by tuck1s »

I found an answer here: http://www.xcore.com/wiki/index.php/Usi ... rts_in_C/C++ that works.