Rev 1221 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1221 | Rev 1222 | ||
---|---|---|---|
Line 1... | Line -... | ||
1 | - | ||
2 | #ifndef _I2C_MASTER_H |
1 | #ifndef _I2C_MASTER_H |
3 | #define _I2C_MASTER_H |
2 | #define _I2C_MASTER_H |
Line 4... | Line 3... | ||
4 | 3 | ||
Line 5... | Line 4... | ||
5 | 4 | ||
- | 5 | #include <inttypes.h> |
|
6 | #include <inttypes.h> |
6 | |
Line 7... | Line 7... | ||
7 | 7 | #define TWI_STATE_MOTOR_TX 0 |
|
- | 8 | #define TWI_STATE_MOTOR_RX 3 |
|
- | 9 | #define TWI_STATE_GYRO_OFFSET_TX 7 |
|
Line -... | Line 10... | ||
- | 10 | ||
- | 11 | extern volatile uint8_t twi_state; |
|
8 | #define TWI_STATE_MOTOR_TX 0 |
12 | extern volatile uint8_t motor_write; |
- | 13 | extern volatile uint8_t motor_read; |
|
9 | #define TWI_STATE_GYRO_OFFSET_TX 7 |
14 | |
10 | 15 | extern uint8_t MissingMotor; |
|
- | 16 | ||
- | 17 | #define MAX_MOTORS 12 |
|
- | 18 | ||
- | 19 | typedef struct |
|
- | 20 | { |
|
11 | extern volatile uint8_t twi_state; |
21 | uint8_t SetPoint; // written by attitude controller |
12 | 22 | uint8_t Present; // 0 if BL was found |
|
- | 23 | uint8_t Error; // I2C error counter |
|
Line 13... | Line 24... | ||
13 | #ifdef USE_QUADRO |
24 | uint8_t Current; // read byck from BL |
Line 14... | Line 25... | ||
14 | extern uint8_t motor_rx[8]; |
25 | uint8_t MaxPWM; // read back from BL |
15 | #else |
26 | } __attribute__((packed)) MotorData_t; |
16 | extern uint8_t motor_rx[16]; |
27 | |
17 | #endif |
28 | extern MotorData_t Motor[MAX_MOTORS]; |
Line 18... | Line 29... | ||
18 | 29 |