#define CCP1 2 // PORTC2 CCP1
#define CCP2 1 // PORTC1 CCP1

#define INIT_PULSE_WIDTH 0 // us
#define AFTER_INIT_PULSE 1000 // us ... 1000 je ok ... je tam dozvuk z inic pulsu a nesmi byt moc aby nezaznamenal minule mereni
#define MEAS_PULSE_WIDTH 100 // us max je 600
//#define AFTER_FIRST_MEAS_PULSE 200 // ms - min je 16ms
#define AFTER_MEAS_PULSE  20 // ms - min je 16ms ... jsou tam dozvuky

const unsigned char reciever1[] = { 1,1,0,0 };
const unsigned char reciever2[] = { 2,2,3,3 };
const unsigned char reciever3[] = { 3,0,2,1 };

const unsigned char transiever[] = { 0,3,1,2 };

const unsigned char mux[] = { 2,2,0,0 };
const unsigned char mux_after[] = { 3,0,2,1 };

void Measure(unsigned char mode, unsigned char secondit);
void SetMux(unsigned char n);

void FallingEdge(unsigned char ccp);
void RisingEdge(unsigned char ccp);
/*

MODE 	0 1 2 3
trans	0 3 1 2       3
r1		1 1 0 0
r2		2 2 3 3    1      2
r3		3 0 2 1
mux		2 2 0 0       0
muxa	3 0 2 1


*/