#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 u24 (PIND&(1<<PD2))
#define i24 (PIND&(1<<PD5))


#define i13	(PIND&(1<<PD7))
#define chyba (PINB&(1<<PB1))

#define schyba sbi(PORTB,PB1)
#define rchyba cbi(PORTB,PB1)
extern volatile unsigned char znak;
extern volatile unsigned int sp_k_imp_cer;
extern volatile unsigned int sp_k_imp_zm;
extern volatile unsigned int sp_k_imp_zl;
extern volatile unsigned int sp_k_imp_zel;


extern volatile unsigned int sp_s_imp_cer;
extern volatile unsigned int sp_s_imp_zm;
extern volatile unsigned int sp_s_imp_zl;
extern volatile unsigned int sp_s_imp_zel;

void nastav_c1(void);
void init(void);
void test_vstupu (void);
void k_kodovani(unsigned char s_p_k_imp,unsigned char s_p_s_imp);
void k_s_nap(void);
void k_vypnuto(void);
