Closed oscarbailey-xmos closed 1 month ago
Note, this is as usage described in xs1.h:
/** Dynamically reconfigure the type of a port.
*
* This builtin function reconfigures the type of a port. Its first argument
* should be a movable pointer to a port. The second argument is the new
* port type to reconfigure to. The return value is a movable pointer to the
* new type of port. You can use the function as follows:
*
* \code
* void f(in port p) {
* in port * movable pp = &p;
* in buffered port:32 * movable q;
* q = reconfigure_port(move(pp), in buffered port:32);
*
* // use *q here as a buffered port
*
* pp = reconfigure_port(move(q), in port);
* }
* \endcode
*
* When reconfiguring a port, all state (buffered input values etc.) on the
* port is lost.
*/
I just want to add a strong +1 to this issue. It adds unnecessary console noise to the sw_usb_audio and lib_xua compilations. I'm sure this can be worked around.
Couple of options
My suggestion for a quick "fix" for the Tx one.
The Rx one is not in a separate function so needs pulling out more ideally? Or can just apply to the whole of spdif_rx.xc I suppose - its not much code.
Found while compiling
sw_usb_audio