Subversion Repositories Projects

Rev

Rev 28 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 28 Rev 51
1
#ifndef _MAIN_H
1
#ifndef _MAIN_H
2
 #define _MAIN_H
2
 #define _MAIN_H
3
 
3
 
4
 
4
 
5
#define SYSCLK  8000000L
5
#define SYSCLK  8000000L
6
 
6
 
7
 
7
 
8
#include <stdio.h>
8
#include <stdio.h>
9
#include <stdlib.h>
9
#include <stdlib.h>
10
#include <string.h>
10
#include <string.h>
11
#include <avr/io.h>
11
#include <avr/io.h>
12
#include <avr/interrupt.h>
12
#include <avr/interrupt.h>
13
#include <avr/eeprom.h>
13
#include <avr/eeprom.h>
14
 
14
 
15
 
15
 
16
#define setbit |=
16
#define setbit |=
17
#define clrbit &=~
17
#define clrbit &=~
18
#define invbit ^=
18
#define invbit ^=
19
#define ledred          3       //on Port C
-
 
20
#define ledgreen        7       //on Port D
-
 
21
#define correction      -60
19
#define correction      -60
22
 
20
 
-
 
21
#define LEDON   setbit
-
 
22
#define LEDOFF  clrbit
-
 
23
 
-
 
24
#define ledred          (1<<3)  //on Port C
-
 
25
#define ledgreen        (1<<7)  //on Port D
-
 
26
 
23
#define CH0_B   (1<<3)
27
#define CH0_B   (1<<3)
24
#define CH1_B   (1<<2)
28
#define CH1_B   (1<<2)
25
#define CH2_B   (1<<1)
29
#define CH2_B   (1<<1)
26
#define CH3_D   (1<<3)
30
#define CH3_D   (1<<3)
27
#define CH4_D   (1<<4)
31
#define CH4_D   (1<<4)
28
#define CH5_D   (1<<5)
32
#define CH5_D   (1<<5)
29
 
33
 
30
 
34
 
31
#endif //_MAIN_H
35
#endif //_MAIN_H
32
 
36
 
33
 
37
 
34
 
38
 
35
 
39
 
36
 
40
 
37
 
41