Subversion Repositories FlightCtrl

Rev

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

Rev 935 Rev 936
Line 1... Line 1...
1
 
1
 
2
#ifndef _I2C_MASTER_H
2
#ifndef _I2C_MASTER_H
Line 3... Line 3...
3
#define _I2C_MASTER_H
3
#define _I2C_MASTER_H
4
 
-
 
5
 
-
 
Line 6... Line -...
6
#include <inttypes.h>
-
 
7
 
-
 
8
//############################################################################
-
 
9
 
-
 
10
// I2C Konstanten
4
 
11
#define SCL_CLOCK  200000L
-
 
12
#define I2C_TIMEOUT 30000
5
 
13
#define I2C_START          0x08
-
 
14
#define I2C_REPEATED_START 0x10
-
 
15
#define I2C_TX_SLA_ACK     0x18
-
 
16
#define I2C_TX_DATA_ACK    0x28
-
 
Line 17... Line 6...
17
#define I2C_RX_SLA_ACK     0x40
6
#include <inttypes.h>
18
#define I2C_RX_DATA_ACK    0x50
-
 
19
 
-
 
20
//############################################################################
7
 
-
 
8
#define TWI_STATE_MOTOR_TX                      0
Line 21... Line 9...
21
 
9
#define TWI_STATE_GYRO_OFFSET_TX        7
22
extern volatile uint8_t twi_state;
10
 
23
extern volatile uint8_t motor;
11
extern volatile uint8_t twi_state;
24
extern volatile uint8_t motorread;
-
 
25
extern volatile uint8_t motor_rx[8];
12
extern volatile uint8_t motor_rx[8];
Line 26... Line 13...
26
 
13
extern volatile uint16_t I2CTimeout;