ISR routine errors [solved: missed a closing brace]

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

okay so i have the following errors pointing to the following code

../Tibet_Water_Management.c:381: error: static declaration of '__vector_7' follows non-static declaration
../Tibet_Water_Management.c:381: error: previous declaration of '__vector_7' was here
../Tibet_Water_Management.c:386: error: static declaration of '__vector_11' follows non-static declaration
../Tibet_Water_Management.c:386: error: previous declaration of '__vector_11' was here
../Tibet_Water_Management.c:407: error: expected declaration or statement at end of input

ISR(TIMER1_COMPA_vect)
{
	update = 1;
}

SIGNAL (SIG_OVERFLOW0)
{
  static char ct0, ct1;
  char i;

  i = key_state ^ ~KEY_INPUT;           // key changed ?
  ct0 = ~( ct0 & i );                   // reset or count ct0
  ct1 = ct0 ^ (ct1 & i);                // reset or count ct1
  i &= ct0 & ct1;                       // count until roll over ?
  key_state ^= i;                       // then toggle debounced state
                                        // now debouncing finished
  key_press |= key_state & i;           // 0->1: key press detect
}

char get_key_press( char key_mask )
{
  cli();
  key_mask &= key_press;                // read key(s)
  key_press ^= key_mask;                // clear key(s)
  sei();
  return key_mask;
}

here is my include list and global variables

#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include "i2cmaster.h"
#include "ks0108.h"
#include "Arial_8.h"


#define F_CPU 8000000UL
#define RTCadd 0b11010000
#define SIadd 0b01000000
#define ROadd 0b01001110
#define EEPROMadd 0b10100000
#define DS1307_SECONDS_REG	0
#define DS1307_MINUTES_REG	1
#define DS1307_HOURS_REG	2
#define DS1307_DAYS_OF_WEEK_REG	3
#define DS1307_DATE_REG		4
#define DS1307_MONTH_REG	5
#define DS1307_YEAR_REG		6
#define DS1307_CONTROL_REG	7
#define DS1307_DATE_TIME_BYTE_COUNT	7
#define KEY_INPUT       PINC	//Need to pick a port
#define Green = 1
#define Blue = 3
#define Red = 2

int D_S_W_Float = 0, //input variables
	C_S_W_Float = 0,
	Sump_Float = 0,
	Flood_Sensor = 0,
	D_S_W_E_Float = 0,
	C_S_W_E_Float = 0,
	float7 = 0,
	float8 = 0;

int Main_Sol = 0, //output variables
	S_W_Sol = 0,
	F_W_Sol = 0,
	Water_Change_Sol = 0,
	C_S_W_Sol = 0,
	D_S_W_Sol = 0,
	Drain_Sol = 0,
	Top_Off_Sol = 0,
	Booster_Pump = 0,
	Kalk_Reactor = 0;

int Enter = 5, //keypad values
	Left = 4,
	Right = 3,
	Up = 2,
	Down = 1;

char Sec;
char Min;
char HR;
char Day;
char Date;
char Month;
char Year;
char error;
char gca_ds1307_regs[DS1307_DATE_TIME_BYTE_COUNT];
char buffer[30];

int Mix_Pump = 0;
int ampm = 0;
int Alarm_LED = 0;
int update = 1;
int page = 0;
int Exit = 1;
int Wchange;

char key_state = 0;
char key_press = 0;

void i2c_rtc_init(void);
void i2c_ioexp_init(void);
void Get_Time(void);
void ds1307_set_date_time(void);
char bin2bcd(char binary_value);
char bcd2bin(char bcd_value);
void update_display(int x ,int y);
char get_key_press( char key_mask );
void Main_Menu(int position);

any suggestions on what i am missing???[/code]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I found what i was missing.....seems I somehow missed one }
in my main menu call before My ISR routine!!!!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK, but in the future with error msgs., indicate WHERE in the code the lines are.

1) Studio 4.18 build 716 (SP3)
2) WinAvr 20100110
3) PN, all on Doze XP... For Now
A) Avr Dragon ver. 1
B) Avr MKII ISP, 2009 model
C) MKII JTAGICE ver. 1