Subversion Repositories FlightCtrl

Rev

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

Rev 1645 Rev 1775
Line 14... Line 14...
14
 
14
 
15
typedef struct {
15
typedef struct {
16
        uint8_t Sync1;
16
  uint8_t Sync1;
17
        uint8_t Sync2;
17
  uint8_t Sync2;
18
        uint8_t Command;
18
  uint8_t Command;
19
        int16_t IntegralNick;
19
  int16_t IntegralPitch;
20
        int16_t IntegralRoll;
20
  int16_t IntegralRoll;
21
        int16_t AccNick;
21
  int16_t AccPitch;
22
        int16_t AccRoll;
22
  int16_t AccRoll;
23
        int16_t GyroHeading;
23
  int16_t GyroHeading;
24
        int16_t GyroNick;
24
  int16_t GyroPitch;
25
        int16_t GyroRoll;
25
  int16_t GyroRoll;
26
        int16_t GyroYaw;
26
  int16_t GyroYaw;
27
        union {
27
  union {
28
                int8_t  sByte[12];
28
    int8_t  sByte[12];
Line 39... Line 39...
39
#define SPI_CMD_GPS_TARGET      102
39
#define SPI_CMD_GPS_TARGET      102
40
#define SPI_KALMAN                      103
40
#define SPI_KALMAN                      103
Line 41... Line 41...
41
 
41
 
42
typedef struct {
42
typedef struct {
43
        uint8_t Command;
43
  uint8_t Command;
44
        int16_t GPSStickNick;
44
  int16_t GPSStickPitch;
45
        int16_t GPSStickRoll;
45
  int16_t GPSStickRoll;
46
        int16_t GPS_Yaw;
46
  int16_t GPS_Yaw;
47
        int16_t CompassHeading;
47
  int16_t CompassHeading;
48
        int16_t Status;
48
  int16_t Status;
Line 54... Line 54...
54
                float   Float[3];
54
    float   Float[3];
55
        } Param;
55
  } Param;
56
        uint8_t Chksum;
56
  uint8_t Chksum;
57
} __attribute__((packed)) FromNaviCtrl_t;
57
} __attribute__((packed)) FromNaviCtrl_t;
Line 58... Line -...
58
 
-
 
59
 
58
 
60
typedef struct {
59
typedef struct {
61
        uint8_t Major;
60
  uint8_t Major;
62
        uint8_t Minor;
61
  uint8_t Minor;
63
        uint8_t Patch;
62
  uint8_t Patch;
-
 
63
  uint8_t Compatible;
64
        uint8_t Compatible;
64
  //    unsigned char Hardware;
Line 65... Line 65...
65
} __attribute__((packed)) SPI_VersionInfo_t;
65
} __attribute__((packed)) SPI_VersionInfo_t;
66
 
66
 
Line 67... Line 67...
67
extern ToNaviCtrl_t                     ToNaviCtrl;
67
extern ToNaviCtrl_t                     toNaviCtrl;
68
extern FromNaviCtrl_t                   FromNaviCtrl;
68
extern FromNaviCtrl_t                   fromNaviCtrl;
69
 
69
 
70
typedef struct {
70
typedef struct {
Line 78... Line 78...
78
extern uint8_t NCSerialDataOkay;
78
extern uint8_t NCSerialDataOkay;
Line 79... Line 79...
79
 
79
 
80
void SPI_MasterInit(void);
80
void SPI_MasterInit(void);
81
void SPI_StartTransmitPacket(void);
81
void SPI_StartTransmitPacket(void);
-
 
82
void SPI_TransmitByte(void);
-
 
83
// new:
Line 82... Line 84...
82
void SPI_TransmitByte(void);
84
// extern void UpdateSPI_Buffer(void);