Rev 112 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 112 | 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 | |||
| 114 | mikeljo | 24 | //#define SYSCLK F_CPU |
| 25 | |||
| 112 | mikeljo | 26 | extern uint8_t r_buffer[129]; |
| 27 | extern uint8_t p_buffer[129]; |
||
| 28 | //extern struct str_DebugIn *p_buffer; |
||
| 29 | |||
| 30 | extern volatile uint8_t key; |
||
| 31 | |||
| 32 | extern volatile uint8_t timer; |
||
| 33 | extern volatile uint8_t rs232_timer; |
||
| 34 | |||
| 35 | #endif |
||
| 36 | |||
| 37 | //#define EEPROM_ADR_VALID 1 |
||
| 38 | |||
| 39 | #define EEPROM_ADR_VALID 1 |
||
| 40 | #define EEPROM_ADR_ORIENTATION 2 |
||
| 41 | |||
| 42 | |||
| 43 | extern unsigned char EEPromArray[]; |
||
| 44 | |||
| 45 | #ifndef EEMEM |
||
| 46 | #define EEMEM __attribute__ ((section (".eeprom"))) |
||
| 47 | #endif |