Subversion Repositories Projects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
111 mikeljo 1
 
2
#ifndef main_h
3
#define main_h
4
 
5
#include <avr/eeprom.h>
6
 
7
#define set_cs() PORTB |= (1<<4)
8
#define clr_cs() PORTB &=~(1<<4)
9
#define set_reset() PORTB |= (1<<2)
10
#define clr_reset() PORTB &=~(1<<2)
11
#define set_A0() PORTB |= (1<<3)                        // Data
12
#define clr_A0() PORTB &=~(1<<3)                        // Command
13
#define set_scl() PORTB |= (1<<7)
14
#define clr_scl() PORTB &=~(1<<7)
15
#define set_si() PORTB |= (1<<5)
16
#define clr_si() PORTB &=~(1<<5)
17
 
18
#define key_enter 0x08
19
#define key_esc 0x04
20
#define key_plus 0x02
21
#define key_minus 0x01
22
#define key_nokey 0x00
23
 
24
extern uint8_t r_buffer[128];
25
extern uint8_t p_buffer[128];
26
//extern struct str_DebugIn    *p_buffer;
27
 
28
extern volatile uint8_t key;
29
 
30
extern volatile uint8_t timer;
31
extern volatile uint8_t rs232_timer;
32
 
33
#endif
34
 
35
//#define EEPROM_ADR_VALID            1
36
 
37
#define EEPROM_ADR_VALID            1
38
#define EEPROM_ADR_ORIENTATION      2
39
 
40
 
41
extern unsigned char EEPromArray[];
42
 
43
#ifndef EEMEM
44
#define EEMEM __attribute__ ((section (".eeprom")))
45
#endif