Subversion Repositories FlightCtrl

Rev

Rev 1638 | Rev 1648 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1638 Rev 1639
Line 18... Line 18...
18
 
18
 
Line 19... Line 19...
19
//############################################################################
19
//############################################################################
20
 
20
 
21
extern volatile unsigned char twi_state;
21
extern volatile unsigned char twi_state;
Line 22... Line 22...
22
extern unsigned char motor,MissingMotor;
22
extern unsigned char motor,MissingMotor;
23
extern unsigned char motorread;
23
extern unsigned char motorread,TransmitBlConfig;
24
 
24
 
Line 42... Line 42...
42
 
42
 
Line 43... Line 43...
43
extern MotorData_t Motor[MAX_MOTORS];
43
extern MotorData_t Motor[MAX_MOTORS];
44
 
44
 
45
void i2c_reset(void);
45
void i2c_reset(void);
46
extern void i2c_init (void); // I2C initialisieren
46
extern void i2c_init (void); // I2C initialisieren
47
extern void i2c_start (void); // Start I2C
47
//extern void i2c_start (void); // Start I2C
48
extern void i2c_stop (void); // Stop I2C
48
//extern void i2c_stop (void); // Stop I2C
Line -... Line 49...
-
 
49
extern void i2c_write_byte (char byte); // 1 Byte schreiben
-
 
50
extern void i2c_reset(void);
-
 
51
 
-
 
52
#define I2C_Start()  {TWCR = (1<<TWSTA) | (1<<TWEN) | (1<<TWINT) | (1<<TWIE);}
-
 
53
#define I2C_Stop() {TWCR = (1<<TWEN) | (1<<TWSTO) | (1<<TWINT);}
-
 
54
#define I2C_ReceiveByte() {TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWIE) | (1<<TWEA);}
49
extern void i2c_write_byte (char byte); // 1 Byte schreiben
55
#define I2C_ReceiveLastByte() {TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWIE);}