Commit 448b46d9 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Updated the micro source code to change the name of the interrupt vectors to...

Updated the micro source code to change the name of the interrupt vectors to comply with the new compiler version.
parent 041f7ee6
......@@ -107,7 +107,7 @@ u08 a2dIsComplete(void)
}
//! Interrupt handler for ADC complete interrupt.
SIGNAL(SIG_ADC)
SIGNAL(ADC_vect)
{
short int data;
......
......@@ -356,7 +356,7 @@ void i2cMasterTransferNI(u08 deviceAddr, u08 sendlength, u08* senddata, u08 rece
*/
//! I2C (TWI) interrupt service routine
SIGNAL(SIG_2WIRE_SERIAL)
SIGNAL(TWI_vect)
{
// read status bits
u08 status = inb(TWSR) & TWSR_STATUS_MASK;
......
......@@ -2,7 +2,6 @@
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/sleep.h>
#include <util/delay.h>
#include "uart.h"
......@@ -14,6 +13,8 @@
#include "i2c.h"
#include <util/delay.h>
typedef struct
{
unsigned char header[2];
......@@ -73,7 +74,7 @@ int main (void)
info.rem_capacity=get_remaining_capacity();
info.time_to_charged=get_time_to_charged();
info.time_to_discharged=get_time_to_discharged();
// send tha information packet
// send the information packet
for(i=0;i<sizeof(TBatteryInfo);i++)
uartSendByte(((unsigned char *)&info)[i]);
}
......
......@@ -28,10 +28,10 @@
// Program ROM constants
// the prescale division values stored in order of timer control register index
// STOP, CLK, CLK/8, CLK/64, CLK/256, CLK/1024
unsigned short __attribute__ ((progmem)) TimerPrescaleFactor[] = {0,1,8,64,256,1024};
const unsigned short __attribute__ ((progmem)) TimerPrescaleFactor[] = {0,1,8,64,256,1024};
// the prescale division values stored in order of timer control register index
// STOP, CLK, CLK/8, CLK/32, CLK/64, CLK/128, CLK/256, CLK/1024
unsigned short __attribute__ ((progmem)) TimerRTCPrescaleFactor[] = {0,1,8,32,64,128,256,1024};
const unsigned short __attribute__ ((progmem)) TimerRTCPrescaleFactor[] = {0,1,8,32,64,128,256,1024};
// Global variables
// time registers
......@@ -392,7 +392,7 @@ void timer1PWMBSet(u16 pwmDuty)
}
//! Interrupt handler for tcnt0 overflow interrupt
TIMER_INTERRUPT_HANDLER(SIG_OVERFLOW0)
TIMER_INTERRUPT_HANDLER(TIMER0_OVF_vect)
{
Timer0Reg0++; // increment low-order counter
......@@ -405,7 +405,7 @@ TIMER_INTERRUPT_HANDLER(SIG_OVERFLOW0)
}
//! Interrupt handler for tcnt1 overflow interrupt
TIMER_INTERRUPT_HANDLER(SIG_OVERFLOW1)
TIMER_INTERRUPT_HANDLER(TIMER1_OVF_vect)
{
// if a user function is defined, execute it
if(TimerIntFunc[TIMER1OVERFLOW_INT])
......@@ -414,7 +414,7 @@ TIMER_INTERRUPT_HANDLER(SIG_OVERFLOW1)
#ifdef TCNT2 // support timer2 only if it exists
//! Interrupt handler for tcnt2 overflow interrupt
TIMER_INTERRUPT_HANDLER(SIG_OVERFLOW2)
TIMER_INTERRUPT_HANDLER(TIMER2_OVF_vect)
{
Timer2Reg0++; // increment low-order counter
......@@ -427,7 +427,7 @@ TIMER_INTERRUPT_HANDLER(SIG_OVERFLOW2)
#ifdef OCR0
// include support for Output Compare 0 for new AVR processors that support it
//! Interrupt handler for OutputCompare0 match (OC0) interrupt
TIMER_INTERRUPT_HANDLER(SIG_OUTPUT_COMPARE0)
TIMER_INTERRUPT_HANDLER(TIMER0_OVF_vect)
{
// if a user function is defined, execute it
if(TimerIntFunc[TIMER0OUTCOMPARE_INT])
......@@ -436,7 +436,7 @@ TIMER_INTERRUPT_HANDLER(SIG_OUTPUT_COMPARE0)
#endif
//! Interrupt handler for CutputCompare1A match (OC1A) interrupt
TIMER_INTERRUPT_HANDLER(SIG_OUTPUT_COMPARE1A)
TIMER_INTERRUPT_HANDLER(TIMER1_COMPA_vect)
{
// if a user function is defined, execute it
if(TimerIntFunc[TIMER1OUTCOMPAREA_INT])
......@@ -444,7 +444,7 @@ TIMER_INTERRUPT_HANDLER(SIG_OUTPUT_COMPARE1A)
}
//! Interrupt handler for OutputCompare1B match (OC1B) interrupt
TIMER_INTERRUPT_HANDLER(SIG_OUTPUT_COMPARE1B)
TIMER_INTERRUPT_HANDLER(TIMER1_COMPB_vect)
{
// if a user function is defined, execute it
if(TimerIntFunc[TIMER1OUTCOMPAREB_INT])
......@@ -452,7 +452,7 @@ TIMER_INTERRUPT_HANDLER(SIG_OUTPUT_COMPARE1B)
}
//! Interrupt handler for InputCapture1 (IC1) interrupt
TIMER_INTERRUPT_HANDLER(SIG_INPUT_CAPTURE1)
TIMER_INTERRUPT_HANDLER(TIMER1_CAPT_vect )
{
// if a user function is defined, execute it
if(TimerIntFunc[TIMER1INPUTCAPTURE_INT])
......@@ -460,7 +460,7 @@ TIMER_INTERRUPT_HANDLER(SIG_INPUT_CAPTURE1)
}
//! Interrupt handler for OutputCompare2 match (OC2) interrupt
TIMER_INTERRUPT_HANDLER(SIG_OUTPUT_COMPARE2)
TIMER_INTERRUPT_HANDLER(TIMER2_COMP_vect)
{
// if a user function is defined, execute it
if(TimerIntFunc[TIMER2OUTCOMPARE_INT])
......
......@@ -232,7 +232,7 @@ u08 uartSendBuffer(char *buffer, u16 nBytes)
// UART Transmit Complete Interrupt Handler
UART_INTERRUPT_HANDLER(SIG_UART_TRANS)
UART_INTERRUPT_HANDLER(USART_TXC_vect)
{
// check if buffered tx is enabled
/* if(uartBufferedTx)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment