Subversion Repositories NaviCtrl

Rev

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

Rev 91 Rev 92
Line 84... Line 84...
84
        u8  MKFlags;                                    // Flags from FC
84
        u8  MKFlags;                                    // Flags from FC
85
        u8  NCFlags;                                    // Flags from NC
85
        u8  NCFlags;                                    // Flags from NC
86
        u8  Errorcode;                                  // 0 --> okay
86
        u8  Errorcode;                                  // 0 --> okay
87
    u8  OperatingRadius;                        // current operation radius around the Home Position in m
87
    u8  OperatingRadius;                        // current operation radius around the Home Position in m
88
        s16 TopSpeed;                                   // velocity in vertical direction in cm/s
88
        s16 TopSpeed;                                   // velocity in vertical direction in cm/s
-
 
89
        u16 TargetHoldTime;                             // time in ms to stay at the given target, counts down to 0 if target has been reached
89
        u8  Reserve[5];                                 // for future use
90
        u8  Reserve[3];                                 // for future use
90
} __attribute__((packed)) NaviData_t;
91
} __attribute__((packed)) NaviData_t;
Line 91... Line 92...
91
 
92
 
92
extern NaviData_t NaviData;
93
extern NaviData_t NaviData;
Line 93... Line 94...
93
extern u8 Request_NaviData;
94
extern u8 Request_NaviData;
94
                                                           
95
 
95
#define NC_FLAG_FREE                    1
96
#define NC_FLAG_FREE                    0x01
96
#define NC_FLAG_PH                              2
97
#define NC_FLAG_PH                              0x02
97
#define NC_FLAG_CH                              4
98
#define NC_FLAG_CH                              0x04
-
 
99
#define NC_FLAG_RANGE_LIMIT             0x08
-
 
100
#define NC_FLAG_NOSERIALLINK    0x10
-
 
101
#define NC_FLAG_TARGET_REACHED  0x20
Line 98... Line -...
98
#define NC_FLAG_RANGE_LIMIT             8
-
 
99
#define NC_NO_SERIAL_DATA    0x10
-
 
100
 
-
 
101
typedef struct
-
 
102
{
-
 
103
        u8 SWMajor;
-
 
104
        u8 SWMinor;
-
 
105
        u8 ProtoMajor;
-
 
106
        u8 ProtoMinor;
-
 
107
        u8 SWPatch;
-
 
108
        u8 Reserved[5];
-
 
109
}  __attribute__((packed)) UART_VersionInfo_t;
-
 
110
 
-
 
111
extern volatile u8 rxd_buffer[RXD_BUFFER_LEN];
102
#define NC_FLAG_7                               0x40
112
extern volatile u8 ReceivedBytes;
103
#define NC_FLAG_8                               0x80
-
 
104
 
Line 113... Line 105...
113
extern volatile u8 rxd_buffer_locked;
105
extern UART_TypeDef *DebugUART;
114
extern UART_TypeDef *DebugUART;
106
extern volatile u8 SerialLinkOkay;
115
extern volatile u8  SerialDataOkay;
107
 
116
 
108
 
Line 117... Line 109...
117
void UART1_Init(void);
109
void UART1_Init(void);
118
void UART1_Transmit(void);
110
void UART1_Transmit(void);
119
void UART1_TransmitTxData(void);
-
 
120
void UART1_ProcessRxData(void);
111
void UART1_TransmitTxData(void);
121
 
112
void UART1_ProcessRxData(void);
122
s16 uart_putchar (char c);
113