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 support@ccsinfo.com

How to do this kind of definition?

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



Joined: 25 Aug 2011
Posts: 1
Location: Sweden

View user's profile Send private message

How to do this kind of definition?
PostPosted: Thu Aug 25, 2011 12:29 am     Reply with quote

Code:

// Definition

#define  RFID_ENABLE_MISO_RISING_EDGE_IRQ()   INT_EXT = 1  //  INTCONbits.INT0IE = 1

// Call the definition / macro

RFID_ENABLE_MISO_RISING_EDGE_IRQ();


// Compiler error:
.....Expecting LVALUE such as a variable name or *expression


Any idea what I'm doing wrong??? Thanks!
Torello



Joined: 29 Sep 2006
Posts: 116

View user's profile Send private message

PostPosted: Thu Aug 25, 2011 1:34 am     Reply with quote

Hi,

In principle correct. But did you define INT_EXT with the #bit define in the correct way?

Some other sample (Pic18xx):

#define bos_dMcuOsc4Mhz() {OSCCON=0x62; INTSRC=1;} //Inline macro
_________________
Regards, Edwin. PCWHD v5.114
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