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

Expecting a ] right where the ] is!

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







Expecting a ] right where the ] is!
PostPosted: Fri Jul 03, 2009 12:24 am     Reply with quote

This beats me! If is use int8 as the decleration the Rx1Buf[Rx1BufferMask] trigers the error! However if I use byte as the decleration the Rx1Buf[Rx1BufferMask] pases OK but the Tx1Buf[Tx1BufferMask] then trigers the error!
Code:

#define Rx1BufferSize 64
#define Rx1BufferMask Rx1BufferSize-1

#define Tx1BufferSize 32;
#define Tx1BufferMask Tx1BufferSize-1
#define Tx1BufferFull Tx1BufferSize-3

// Recieve buffer
byte Rx1Buf[Rx1BufferMask];
byte R1Data;
byte Rx1Head;           //USED BY INTERRUPT
byte Rx1Tail;
byte Rx1Bcn;            //USED BY INTERRUPT

// Transmit buffer
byte Tx1Buf[Tx1BufferMask];
byte Tx1Head;
byte Tx1Tail;           //USED BY INTERRUPT
byte Tx1Bcnt;           //USED BY INTERRUPT
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Jul 03, 2009 12:32 am     Reply with quote

Quote:
#define Tx1BufferSize 32;

In the general case, don't put a semi-colon at the end of a #define
statement.
ahinst



Joined: 03 Jul 2009
Posts: 1

View user's profile Send private message

PostPosted: Fri Jul 03, 2009 1:33 am     Reply with quote

Thanks missed that one!
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