Trouble defining I2S_resources

Technical questions regarding the XTC tools and programming with XMOS.
User avatar
segher
XCore Expert
Posts: 844
Joined: Sun Jul 11, 2010 1:31 am

Post by segher »

It seems you are still defining this variable in function scope.
The compiler says so, and says that is bad; try file scope :-)


User avatar
Lefty4000
Active Member
Posts: 32
Joined: Mon Nov 11, 2013 6:17 pm

Post by Lefty4000 »

Okay so I think I get what you mean

I took the definition out of the main method and put it right above it although it returned the same error except for this:

Code: Select all

../src/Audio Slice with startKIT.xc:33: error: local variable `i2s_resources' has type that contains a port
Apart from that, I have the same error.

Am I doing it wrong? I must be misunderstanding.
Keep the help coming though, it is awesome.
User avatar
segher
XCore Expert
Posts: 844
Joined: Sun Jul 11, 2010 1:31 am

Post by segher »

I think you're missing the SCLK port?
User avatar
Lefty4000
Active Member
Posts: 32
Joined: Mon Nov 11, 2013 6:17 pm

Post by Lefty4000 »

OH MY GOODNESS!!!!
I thought I had it.

Well there isn't an error there anymore. I do get hit with a bunch of errors that say, "
previously declared as i2s_resources.(some_parameter)" for each of the i2s_resource parameters although I'm guessing that is just something has been cached for the debug file. Probably just a matter of deleting that and then re-building. EDIT: Oh and there isn't a red "X" next to any of my files so..thats the confusing part"

Thank you so much for your help everybody!