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

Expecting an Identifier, Expecting a Declaration ??

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



Joined: 14 Sep 2003
Posts: 96
Location: Toronto, Ontario, Canada

View user's profile Send private message

Expecting an Identifier, Expecting a Declaration ??
PostPosted: Sun Jul 05, 2015 4:19 pm     Reply with quote

Hi

I have modified hw.h from the examples CCS/Microchip Stack but getting this error.

I just changed existing defines below and added more that my board has, commented with ADDED NEW.

The commented out LED_OFF Section are all the error that occur. When commented out, it compiles fine.

ERROR -> Expecting an Identifier
ERROR -> Expecting a declaration


Code:

#elif (STACK_USE_YAK_PICWEB)
   #include <18F97J60.h>
   #include "tcpip\p18cxxx.h"

   #use delay(crystal=25MHz, clock=41666667)
   #fuses NOWDT, ETHLED
   
   #use rs232(baud=115200, uart1, stream=STREAM_UI, errors)
     
   #define BUTTON1_PRESSED()  (!input(PIN_F2))
   #define BUTTON2_PRESSED()  (!input(PIN_F3))     // ADDED NEW
   #define BUTTON3_PRESSED()  (!input(PIN_F4))     // ADDED NEW
   #define BUTTON4_PRESSED()  (!input(PIN_F5))     // ADDED NEW
   #define USER_LED1    PIN_J0
   #define USER_LED2    PIN_J1
   #define USER_LED3    PIN_J2     
   #define USER_LED4    PIN_J3     // ADDED NEW
   #define USER_LED5    PIN_J4     // ADDED NEW
   #define USER_LED6    PIN_J5     // ADDED NEW
   #define USER_LED7    PIN_J6     // ADDED NEW
   #define USER_LED8    PIN_J7     // ADDED NEW
   #define LED_OFF      output_low
   #define LED_ON       output_high
   #define STANDARD_ADC_STRING  "AN2"
   #define STANDARD_ADC_CHANNEL 2

   #define LCD_ENABLE_PIN  PIN_H0
   #define LCD_RS_PIN      PIN_H2
   #define LCD_RW_PIN      PIN_H1
   #define LCD_DATA4       PIN_E4
   #define LCD_DATA5       PIN_E5
   #define LCD_DATA6       PIN_E6
   #define LCD_DATA7       PIN_E7
   #define LCD_BL          PIN_H3      // ADDED NEW
     
   #ifndef STACK_USE_PICDEM_LCD
      #define STACK_USE_PICDEM_LCD 1
   #endif
   #if STACK_USE_PICDEM_LCD
      #include <lcd.c>
   #endif
   
   #define HW_INIT() \
      delay_ms(144); \
      restart_wdt(); \
      setup_adc(ADC_CLOCK_INTERNAL);   \
      setup_adc_ports(AN0_TO_AN2);  \
      set_adc_channel(STANDARD_ADC_CHANNEL); \
      setup_comparator(NC_NC_NC_NC);   \
      output_drive(PIN_A1);   \
      output_drive(PIN_A0);   \
      output_drive(USER_LED1);   \
      output_drive(USER_LED2);   \
      output_drive(USER_LED3);   \
      output_drive(USER_LED4);   \
      output_drive(USER_LED5);   \
      output_drive(USER_LED6);   \
      output_drive(USER_LED7);   \
      output_drive(USER_LED8);   \
      LED_OFF(USER_LED1);  \
      LED_OFF(USER_LED2);  \
      LED_OFF(USER_LED3);
     
/*     
      LED_OFF(USER_LED4);    // ADDED NEW ERROR
      LED_OFF(USER_LED5);    // ADDED NEW ERROR
      LED_OFF(USER_LED6);    // ADDED NEW ERROR
      LED_OFF(USER_LED7);    // ADDED NEW ERROR
      LED_OFF(USER_LED8)     // ADDED NEW ERROR

      LED_OFF(LCD_BL);         // ADDED NEW ERROR
*/

   #define EEPROM_SELECT   PIN_C0  //0
   #define EEPROM_DI       PIN_C5  //0
   #define EEPROM_DO       PIN_C4  //i
   #define EEPROM_CLK      PIN_C3  //0
   #define EEPROM_USE_SPI  1
   #include "AT25256.C"
   //#include "25LC256.C"


I did define them. Whats the error.

Thanks in advance for any help, Probably something simple.

Thanks

Jerry
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Jul 05, 2015 4:38 pm     Reply with quote

This is a macro. You're missing all the line continuation marks on your
added lines. Just copy what the original macro did, and copy the way
it ended, too.
Jerry I



Joined: 14 Sep 2003
Posts: 96
Location: Toronto, Ontario, Canada

View user's profile Send private message

PostPosted: Sun Jul 05, 2015 4:55 pm     Reply with quote

Thanks PCM Programmer

I did do that before I asked the question, my problem was I had a space in between.

Thanks Again.
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