CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

#int_ext and, inline and "Different Levels of Indirecti

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Peter
Guest







#int_ext and, inline and "Different Levels of Indirecti
PostPosted: Sat Aug 11, 2007 5:07 pm     Reply with quote

Hello there.

I'm fooling around PIC16F684 and when trying to implement the interrupt #int_ext , compiler says about different levels of indirection.

Let's say the code looks as follows:
void doSth(int& data)
{
data= ...... ;
}

#int_ext
void myfunc1(void)
{
int i;

for (i=4; i--;)
doSth(dataOne[i], 8); // <== different levels of indirection!!!
}

I also have noticed that doSth is treated by CCS compiler like an inline function (just in scope of myFunc1). This is - I guess - the source of the issue. How to overcome this? I could give up on this loop and call doSth 4 times, but it takes each time a huge chunk of the program memory that I'm getting short of!


Cheers,
Peter.
Peter
Guest







#int_ext and, inline and "Different Levels of Indirecti
PostPosted: Sat Aug 11, 2007 6:06 pm     Reply with quote

Just forgotten, when passing pointer rather than a reference, the same thing happens! So the following doesn't work:

void doSth(int* pdata, int secondpar)
{
*pdata= ...... ;
}
Peter
Guest







#int_ext and, inline and "Different Levels of Indirecti
PostPosted: Sat Aug 11, 2007 6:13 pm     Reply with quote

Right, false alarm! Sorry. Checked this code once more and this was owing to a reference parameter as expected!

Cheers,
Peter.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group