I have read the programming guide section on parallel tasks and communication and am learning about how XMOS uses interfaces and clients, but am still a little hazy on exactly the implementation for my purposes. Since I2C is used across several functions in audiohw.xc, do each one of these functions now need to be a client, or can I just make the usb_audio_io() the client, since it calls audio(), which calls the functions in audiohw.xc?
Would the snippet from my main() i2C setup be something like this?
Code: Select all
/* ........setup XUD_Tile, etc..... */
i2c_master_single_port(i2c, 2, p_i2c, 100, 1, 2, 0xC);
usb_audio_io(i2c, c_mix_out, c_adc
#if defined(SPDIF_TX) && (SPDIF_TX_TILE != AUDIO_IO_TILE)
,c_aud_cfg, c_spdif_rx, c_adat_rx, c_clk_ctl, c_clk_int
#if XUD_TILE != 0
#if (NUM_PDM_MICS > 0)
/* ........setup other Tiles, etc..... */