Subversion Repositories FlightCtrl

Rev

Rev 885 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 885 Rev 886
Line 1... Line -...
1
/*############################################################################
-
 
2
############################################################################*/
-
 
Line 3... Line 1...
3
 
1
 
4
#ifndef _I2C_MASTER_H
2
#ifndef _I2C_MASTER_H
5
#define _I2C_MASTER_H
3
#define _I2C_MASTER_H
-
 
4
 
-
 
5
 
6
 
6
#include <inttypes.h>
Line 7... Line 7...
7
//############################################################################
7
 
8
 
8
//############################################################################
9
// I2C Konstanten
9
 
Line 16... Line 16...
16
#define I2C_RX_SLA_ACK     0x40
16
#define I2C_TX_DATA_ACK    0x28
17
#define I2C_RX_DATA_ACK    0x50
17
#define I2C_RX_SLA_ACK     0x40
Line 18... Line 18...
18
 
18
#define I2C_RX_DATA_ACK    0x50
Line 19... Line 19...
19
//############################################################################
19
 
20
 
20
//############################################################################
21
extern unsigned char twi_state;
21
 
22
extern unsigned char motor;
22
extern volatile uint8_t twi_state;
23
extern unsigned char motorread;
23
extern volatile uint8_t motor;
24
extern unsigned char motor_rx[8];
-
 
25
 
24
extern volatile uint8_t motorread;
26
void i2c_reset(void);
25
extern volatile uint8_t motor_rx[8];
27
extern void i2c_init (void); // I2C initialisieren
26
 
28
extern char i2c_start (void); // Start I2C
27
extern void I2C_Init (void);  // Initialize I2C
29
extern void i2c_stop (void); // Stop I2C
28
extern void I2C_Start (void); // Start I2C
Line 30... Line 29...
30
extern char i2c_write_byte (char byte); // 1 Byte schreiben
29
extern void I2C_Stop (void); // Stop I2C