Subversion Repositories Projects

Rev

Blame | Last modification | View Log | RSS feed

#if defined (__AVR_ATmega8__)
#define TIMER_TEILER          CK8
//#define TIMER_RELOAD_VALUE    125
#endif

#define INT0_ENABLE      GIMSK |= 0x40          
#define INT0_DISABLE     GIMSK &= ~0x40          
#define TIM0_START       TIMSK |= 0x01                        
#define TIM0_STOPP       TIMSK &= ~0x01                        
#define ICP_INT_ENABLE   TIMSK |= 0x20                        
#define ICP_INT_DISABLE  TIMSK &= ~0x20                        
#define TIMER1_INT_ENABLE   TIMSK |= 0x04                        
#define TIMER1_INT_DISABLE  TIMSK &= ~0x04                        
#define TIMER2_INT_ENABLE   TIMSK |= 0x40                        
#define TIMER2_INT_DISABLE  TIMSK &= ~0x40                        
#define INT0_POS_FLANKE   MCUCR |= 0x01
#define INT0_ANY_FLANKE   MCUCR |= 0x01
#define INT0_NEG_FLANKE   MCUCR &= ~0x01
#define CLR_INT0_FLAG     GIFR &= ~0x40
#define INIT_INT0_FLANKE  MCUCR &= ~0x03; MCUCR |= 0x02;
#define TIMER0_PRESCALER  TCCR0
#define ICP_POS_FLANKE    TCCR1B |= (1<<ICES1)
#define ICP_NEG_FLANKE    TCCR1B &= ~(1<<ICES1)


extern volatile unsigned int CountMilliseconds;
extern volatile unsigned char Timer0Overflow;
extern volatile unsigned int flag10ms;


void Timer_Init(void);
void Delay_ms(unsigned int);
unsigned int SetDelay (unsigned int t);
char CheckDelay (unsigned int t);