Some information can be found in the "XC Librares Reference", but it doesn't show examples how to use them. Is there som documentation about efficient use of all built in functions macros and other goodies that in the h files ??
An example: If you read the Programming XC on XMOS Devices it shows how to use Channels or Streaming channel. But you can also find the inuint() and outuint in xc.h
I understand how to use them, but not why, or when to use outuint instead of :> or <:
Code: Select all
**
* Streams in a unsigned int from a channel end. If the next word of data
* channel in the channel contains a control token then an exception is raised.
* \param c The channel end to stream data in on.
* \return The value received.
*/
unsigned inuint(chanend c);
#define inuint(c) __builtin_in_uint(c)
and
Code: Select all
/**
* Streams out a value as an unsigned int on a channel end.
* \param c The channel end to stream data out on.
* \param val The value to output.
*/
void outuint(chanend c, unsigned val);
#define outuint(c, val) __builtin_out_uint(c, val)