#include <avr/io.h>
#include<avr/interrupt.h>
#include<util/delay.h>

#define sbi(reg,bit) reg|=(1<<(bit))
#define cbi(reg,bit) reg&=~(1<<(bit))

#define ss24 sbi(PORTD,PD4)
#define ss13 sbi(PORTD,PD6)

#define rs24 cbi(PORTD,PD4)
#define rs13 cbi(PORTD,PD6)

#define s24	(PIND&(1<<PD4))
#define u24 (PIND&(1<<PD2))
#define i24 (PIND&(1<<PD5))

#define s13 (PIND&(1<<PD6))
#define u13 (PIND&(1<<PD3))
#define i13	(PIND&(1<<PD7))

extern volatile unsigned int znak;

void nastav_citac2(void);
void zap_k_nap(void);
void zap_s_nap(void);
void vypni_vse(void);
void init (void);
void test_vstupu(void);
void koduj(void);
