Subversion Repositories Projects

Rev

Rev 112 | Blame | Last modification | View Log | RSS feed


#ifndef main_h
#define main_h

#include <avr/eeprom.h>

#define set_cs() PORTB |= (1<<4)
#define clr_cs() PORTB &=~(1<<4)
#define set_reset() PORTB |= (1<<2)
#define clr_reset() PORTB &=~(1<<2)
#define set_A0() PORTB |= (1<<3)                        // Data
#define clr_A0() PORTB &=~(1<<3)                        // Command
#define set_scl() PORTB |= (1<<7)
#define clr_scl() PORTB &=~(1<<7)
#define set_si() PORTB |= (1<<5)
#define clr_si() PORTB &=~(1<<5)

#define key_enter 0x08
#define key_esc 0x04
#define key_plus 0x02
#define key_minus 0x01
#define key_nokey 0x00

//#define SYSCLK F_CPU

extern uint8_t r_buffer[129];
extern uint8_t p_buffer[129];
//extern struct str_DebugIn    *p_buffer;

extern volatile uint8_t key;

extern volatile uint8_t timer;
extern volatile uint8_t rs232_timer;

#endif

//#define EEPROM_ADR_VALID            1

#define EEPROM_ADR_VALID            1
#define EEPROM_ADR_ORIENTATION      2


extern unsigned char EEPromArray[];

#ifndef EEMEM
#define EEMEM __attribute__ ((section (".eeprom")))
#endif