canon-lens/02-TEST/signals.h
2015-07-23 13:44:53 +03:00

51 lines
1.2 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*********** æÕÎËÃÉÉ ***********************/
void send9bit(unsigned char something);
unsigned char get9bit();
void sendword(unsigned char data_H, unsigned char data_L);
unsigned char getword();
unsigned char ten_times_read();
void init();
void timer1set();
void timer1int();
void SPI_int();
/*********** ðÅÒÅÞÅÎØ ËÏÍÁÎÄ ************/
// ÐÏÌÕÞÉÔØ Ó ËÏÍÐØÀÔÅÒÁ Ä×Á ÂÁÊÔÁ ÄÁÎÎÙÈ É ÚÁÐÉÓÁÔØ ÉÈ × SPI
#define SPI_send 1
// ÒÅÖÉÍÙ ÒÁÂÏÔÙ SPI
#define IMP_RISE 2
#define IMP_FALL 3
#define SPI_ON 4
#define SPI_OFF 5
#define SPI_ACTIVE 6
#define SPI_PASSIVE 7
#define MID_DATA 8
#define END_DATA 9
#define SPI_SHOW 14
// ÓËÏÒÏÓÔÉ ÐÏÒÔÁ (ÐÏ ÕÍÏÌÞÁÎÉÀ 9600)
#define MID_SPD 15
#define HIG_SPD 16
// ÚÁÐÉÓÁÔØ × ÐÏÒÔ ÏÄÉÎ ÐÏÌÕÞÅÎÎÙÊ ÂÁÊÔ
#define SPI_send_one 17
// ÔÅËÕÝÉÊ ÐÅÒÉÏÄ ÔÁÊÍÅÒÁ
#define TMR_SETTINGS 18
// ÕÓÔÁÎÏ×ÉÔØ ÚÎÁÞÅÎÉÅ ÔÁÊÍÅÒÁ
#define SET_TIMER 26
// ÓÂÒÏÓ
#define INIT 28
#define TEST 29
/************** ïÛÉÂËÉ É ÓÉÇÎÁÌÙ ËÏÎÔÒÏÌÌÅÒÁ ******************/
// ×ÓÅ × ÐÏÒÑÄËÅ
#define OK 22
// ÎÅÔ ÓÔÏÐÏ×ÏÇÏ ÂÉÔÁ
#define NO_STOP_BIT 24
// ÐÅÒÅÐÏÌÎÅÎÉÅ ÒÅÇÉÓÔÒÏ×
#define STACK_OVERFLOW 25
// ÏÛÉÂÏÞËÁÑ ËÏÍÁÎÄÁ
#define ERR_CMD 31
#define TWOBYTE 33 // Ä×ÕÈÂÁÊÔÎÁÑ ÐÏÓÙÌËÁ