From 36246a4f2dff3404ddda94dab6568b4fe7ca469a Mon Sep 17 00:00:00 2001 From: Russell Date: Thu, 17 Nov 2011 15:17:26 +0000 Subject: [PATCH] Remove i2c chanend argument from config functions. --- module_usb_aud_shared/audio.h | 4 +--- module_usb_aud_shared/audio.xc | 10 +++++----- module_usb_aud_shared/clocking/clocking.h | 4 ++-- module_usb_aud_shared/codec/codec.h | 4 ++-- module_usb_aud_shared/pll/pll.h | 4 ++-- 5 files changed, 12 insertions(+), 14 deletions(-) diff --git a/module_usb_aud_shared/audio.h b/module_usb_aud_shared/audio.h index 77da8b77..8fc0568d 100644 --- a/module_usb_aud_shared/audio.h +++ b/module_usb_aud_shared/audio.h @@ -12,9 +12,7 @@ * receiving/transmitting samples * \param c_config An optional channel that will be passed on to the * CODEC configuration functions. - * \param c_i2c An optional channel that will be passed on to the - * functions requiring i2c. */ -void audio(chanend c_in, chanend ?c_dig, chanend ?c_config, chanend ?c_i2c); +void audio(chanend c_in, chanend ?c_dig, chanend ?c_config); #endif // __audio_h__ diff --git a/module_usb_aud_shared/audio.xc b/module_usb_aud_shared/audio.xc index 2d67d51c..e207e05d 100755 --- a/module_usb_aud_shared/audio.xc +++ b/module_usb_aud_shared/audio.xc @@ -496,7 +496,7 @@ static unsigned dummy_deliver(chanend c_out) { return 0; } -void audio(chanend c_mix_out, chanend ?c_dig_rx, chanend ?c_config, chanend ?c_i2c) +void audio(chanend c_mix_out, chanend ?c_dig_rx, chanend ?c_config) { #ifdef SPDIF chan c_spdif_out; @@ -511,10 +511,10 @@ void audio(chanend c_mix_out, chanend ?c_dig_rx, chanend ?c_config, chanend ?c_i #endif /* Initialise master clock generation */ - ClockingInit(c_i2c); + ClockingInit(); /* Perform required CODEC/ADC/DAC initialisation */ - CodecInit(c_config, c_i2c); + CodecInit(c_config); while(1) { @@ -533,7 +533,7 @@ void audio(chanend c_mix_out, chanend ?c_dig_rx, chanend ?c_config, chanend ?c_i divide = mClk / ( curSamFreq * 64 ); /* Configure clocking for required master clock */ - ClockingConfig(mClk, c_i2c); + ClockingConfig(mClk); if(!firstRun) { @@ -553,7 +553,7 @@ void audio(chanend c_mix_out, chanend ?c_dig_rx, chanend ?c_config, chanend ?c_i firstRun = 0; /* Configure CODEC/DAC/ADC for SampleFreq/MClk */ - CodecConfig(curSamFreq, mClk, c_config, c_i2c); + CodecConfig(curSamFreq, mClk, c_config); /* Configure audio ports */ ConfigAudioPorts(divide); diff --git a/module_usb_aud_shared/clocking/clocking.h b/module_usb_aud_shared/clocking/clocking.h index a02ebf15..88fc786b 100644 --- a/module_usb_aud_shared/clocking/clocking.h +++ b/module_usb_aud_shared/clocking/clocking.h @@ -5,10 +5,10 @@ /* Functions that handle master clock generation. These need modifying for an existing design */ /* Any initialisation required for master clock generation - run once at start up */ -void ClockingInit(chanend ?c); +void ClockingInit(void); /* Configuration for a specific master clock frequency - run every sample frequency change */ -void ClockingConfig(unsigned mClkFreq, chanend ?c); +void ClockingConfig(unsigned mClkFreq); /** Clock generation and digital audio I/O handling. diff --git a/module_usb_aud_shared/codec/codec.h b/module_usb_aud_shared/codec/codec.h index c97662ec..452ac900 100644 --- a/module_usb_aud_shared/codec/codec.h +++ b/module_usb_aud_shared/codec/codec.h @@ -6,9 +6,9 @@ /* TODO Are the channel args required? */ /* Any required CODEC initialisation - run once at start up */ -void CodecInit(chanend ?c_codec, chanend ?c_i2c); +void CodecInit(chanend ?c_codec); /* Configure condec for a specific mClk/Sample frquency - run on every sample frequency change */ -void CodecConfig(unsigned samFreq, unsigned mClk, chanend ?c_codec, chanend ?c_i2c); +void CodecConfig(unsigned samFreq, unsigned mClk, chanend ?c_codec); #endif diff --git a/module_usb_aud_shared/pll/pll.h b/module_usb_aud_shared/pll/pll.h index bc555fcf..d79ca14f 100644 --- a/module_usb_aud_shared/pll/pll.h +++ b/module_usb_aud_shared/pll/pll.h @@ -1,4 +1,4 @@ -void PllInit(chanend c); +void PllInit(void); -void PllMult(unsigned mult, chanend c); +void PllMult(unsigned mult);