diff --git a/module_usb_audio/main.xc b/module_usb_audio/main.xc index 17a78074..33937ae8 100755 --- a/module_usb_audio/main.xc +++ b/module_usb_audio/main.xc @@ -20,9 +20,7 @@ #include "endpoint0.h" #include "usb_buffer.h" #include "decouple.h" -#ifdef MIDI #include "usb_midi.h" -#endif #include "audio.h" #ifdef IAP @@ -92,6 +90,8 @@ on tile[0] : buffered in port:32 p_i2s_adc[I2S_WIRES_ADC] = #define AUDIO_IO_CORE 0 #endif + + #ifndef CODEC_MASTER on tile[AUDIO_IO_CORE] : buffered out port:32 p_lrclk = PORT_I2S_LRCLK; on tile[AUDIO_IO_CORE] : buffered out port:32 p_bclk = PORT_I2S_BCLK; @@ -143,6 +143,11 @@ clock clk = XS1_CLKBLK_4; #define clk null #endif +#ifdef IAP +on tile [AUDIO_IO_CORE] : port p_i2c_sda = PORT_I2C_SDA; +on tile [AUDIO_IO_CORE] : port p_i2c_scl = PORT_I2C_SCL; +#endif + /* Endpoint type tables for XUD */ XUD_EpType epTypeTableOut[EP_CNT_OUT] = { XUD_EPTYPE_CTL | XUD_STATUS_ENABLE, XUD_EPTYPE_ISO, /* Audio */ @@ -324,7 +329,7 @@ int main() #ifdef MIDI usb_midi(p_midi_rx, p_midi_tx, clk_midi, c_midi, 0, null, null, null, null); #else - iAP(c_iap, null, i2cPorts.scl, i2cPorts.sda); + iAP(c_iap, null, p_i2c_scl, p_i2c_sda); #endif } #endif