Rev 112 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 112 | Rev 114 | ||
---|---|---|---|
1 | 1 | ||
2 | #ifndef main_h |
2 | #ifndef main_h |
3 | #define main_h |
3 | #define main_h |
4 | 4 | ||
5 | #include <avr/eeprom.h> |
5 | #include <avr/eeprom.h> |
6 | 6 | ||
7 | #define set_cs() PORTB |= (1<<4) |
7 | #define set_cs() PORTB |= (1<<4) |
8 | #define clr_cs() PORTB &=~(1<<4) |
8 | #define clr_cs() PORTB &=~(1<<4) |
9 | #define set_reset() PORTB |= (1<<2) |
9 | #define set_reset() PORTB |= (1<<2) |
10 | #define clr_reset() PORTB &=~(1<<2) |
10 | #define clr_reset() PORTB &=~(1<<2) |
11 | #define set_A0() PORTB |= (1<<3) // Data |
11 | #define set_A0() PORTB |= (1<<3) // Data |
12 | #define clr_A0() PORTB &=~(1<<3) // Command |
12 | #define clr_A0() PORTB &=~(1<<3) // Command |
13 | #define set_scl() PORTB |= (1<<7) |
13 | #define set_scl() PORTB |= (1<<7) |
14 | #define clr_scl() PORTB &=~(1<<7) |
14 | #define clr_scl() PORTB &=~(1<<7) |
15 | #define set_si() PORTB |= (1<<5) |
15 | #define set_si() PORTB |= (1<<5) |
16 | #define clr_si() PORTB &=~(1<<5) |
16 | #define clr_si() PORTB &=~(1<<5) |
17 | 17 | ||
18 | #define key_enter 0x08 |
18 | #define key_enter 0x08 |
19 | #define key_esc 0x04 |
19 | #define key_esc 0x04 |
20 | #define key_plus 0x02 |
20 | #define key_plus 0x02 |
21 | #define key_minus 0x01 |
21 | #define key_minus 0x01 |
22 | #define key_nokey 0x00 |
22 | #define key_nokey 0x00 |
- | 23 | ||
- | 24 | //#define SYSCLK F_CPU |
|
23 | 25 | ||
24 | extern uint8_t r_buffer[129]; |
26 | extern uint8_t r_buffer[129]; |
25 | extern uint8_t p_buffer[129]; |
27 | extern uint8_t p_buffer[129]; |
26 | //extern struct str_DebugIn *p_buffer; |
28 | //extern struct str_DebugIn *p_buffer; |
27 | 29 | ||
28 | extern volatile uint8_t key; |
30 | extern volatile uint8_t key; |
29 | 31 | ||
30 | extern volatile uint8_t timer; |
32 | extern volatile uint8_t timer; |
31 | extern volatile uint8_t rs232_timer; |
33 | extern volatile uint8_t rs232_timer; |
32 | 34 | ||
33 | #endif |
35 | #endif |
34 | 36 | ||
35 | //#define EEPROM_ADR_VALID 1 |
37 | //#define EEPROM_ADR_VALID 1 |
36 | 38 | ||
37 | #define EEPROM_ADR_VALID 1 |
39 | #define EEPROM_ADR_VALID 1 |
38 | #define EEPROM_ADR_ORIENTATION 2 |
40 | #define EEPROM_ADR_ORIENTATION 2 |
39 | 41 | ||
40 | 42 | ||
41 | extern unsigned char EEPromArray[]; |
43 | extern unsigned char EEPromArray[]; |
42 | 44 | ||
43 | #ifndef EEMEM |
45 | #ifndef EEMEM |
44 | #define EEMEM __attribute__ ((section (".eeprom"))) |
46 | #define EEMEM __attribute__ ((section (".eeprom"))) |
45 | #endif |
47 | #endif |
46 | 48 |