Subversion Repositories FlightCtrl

Rev

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

Rev 1910 Rev 2099
Line 1... Line 1...
1
#ifndef _UART0_H
1
#ifndef _UART0_H
2
#define _UART0_H
2
#define _UART0_H
Line 3... Line -...
3
 
-
 
4
// must be at least 4('#'+Addr+'CmdID'+'\r')+ (80 * 4)/3 = 111 bytes
3
 
5
#define TXD_BUFFER_LEN  150
4
#define TXD_BUFFER_LEN  180
Line 6... Line 5...
6
#define RXD_BUFFER_LEN  150
5
#define RXD_BUFFER_LEN  180
Line 7... Line 6...
7
 
6
 
8
#include <inttypes.h>
7
#include <inttypes.h>
Line -... Line 8...
-
 
8
 
-
 
9
//Baud rate of the USART
-
 
10
#define USART0_BAUD 57600
-
 
11
 
9
 
12
#define DISPLAYBUFFSIZE 80
10
//Baud rate of the USART
13
extern int8_t displayBuff[DISPLAYBUFFSIZE];
11
#define USART0_BAUD 57600
14
extern uint8_t dispPtr;
12
 
15
 
Line 13... Line 16...
13
extern void usart0_Init(void);
16
extern void usart0_init(void);
Line 14... Line 17...
14
extern void usart0_TransmitTxData(void);
17
extern void usart0_transmitTxData(void);
15
extern void usart0_ProcessRxData(void);
18
extern void usart0_processRxData(void);
Line 16... Line 19...
16
extern int16_t uart_putchar(int8_t c);
19
extern int16_t uart_putchar(int8_t c);
17
 
-
 
18
extern uint8_t RemotePollDisplayLine;
-
 
19
 
-
 
20
extern uint8_t outputTestActive;
-
 
21
extern uint8_t outputTest[16];
-
 
22
 
-
 
23
typedef struct {
-
 
24
        uint8_t Digital[2];
20
 
25
        uint16_t Analog[32]; // Debugvalues
21
// extern uint8_t remotePollDisplayLine;
26
}__attribute__((packed)) DebugOut_t;
22
 
27
 
23
extern uint8_t servoTestActive;
28
extern DebugOut_t DebugOut;
24
extern uint8_t servoTest[16];
Line 29... Line 25...
29
 
25
 
30
typedef struct {
-
 
31
        int16_t AngleNick; // in 0.1 deg
26
typedef struct {
32
        int16_t AngleRoll; // in 0.1 deg
27
  int16_t anglePitch; // in 0.1 deg
33
        int16_t Heading; // in 0.1 deg
28
  int16_t angleRoll;  // in 0.1 deg
34
        uint8_t reserve[8];
-
 
35
}__attribute__((packed)) Data3D_t;
29
  int16_t heading;    // in 0.1 deg
36
 
30
  uint8_t reserved[8];
Line 37... Line 31...
37
typedef struct {
31
}__attribute__((packed)) Data3D_t;