Rev 935 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 935 | Rev 936 | ||
---|---|---|---|
1 | #ifndef _UART_H |
1 | #ifndef _UART_H |
2 | #define _UART_H |
2 | #define _UART_H |
3 | 3 | ||
4 | #define TXD_BUFFER_LEN 150 |
4 | #define TXD_BUFFER_LEN 150 |
5 | #define RXD_BUFFER_LEN 150 |
5 | #define RXD_BUFFER_LEN 150 |
6 | 6 | ||
7 | #define DUB_KEY_UP 4 |
7 | #define DUB_KEY_UP 4 |
8 | #define DUB_KEY_DOWN 8 |
8 | #define DUB_KEY_DOWN 8 |
9 | #define DUB_KEY_LEFT 16 |
9 | #define DUB_KEY_LEFT 16 |
10 | #define DUB_KEY_RIGHT 32 |
10 | #define DUB_KEY_RIGHT 32 |
11 | #define DUB_KEY_FIRE 64 |
11 | #define DUB_KEY_FIRE 64 |
12 | 12 | ||
13 | #include <inttypes.h> |
13 | #include <inttypes.h> |
14 | 14 | ||
15 | //Baud rate of the USART |
15 | //Baud rate of the USART |
16 | #define USART0_BAUD 57600 |
16 | #define USART0_BAUD 57600 |
17 | 17 | ||
18 | 18 | ||
19 | extern void USART0_Init (void); |
19 | extern void USART0_Init (void); |
20 | extern void USART0_TransmitTxData(void); |
20 | extern void USART0_TransmitTxData(void); |
21 | extern void USART0_ProcessRxData(void); |
21 | extern void USART0_ProcessRxData(void); |
22 | extern int16_t uart_putchar(int8_t c); |
22 | extern int16_t uart_putchar(int8_t c); |
23 | 23 | ||
24 | extern uint8_t PcAccess; |
24 | extern uint8_t PcAccess; |
25 | extern uint8_t RemotePollDisplayLine; |
25 | extern uint8_t RemotePollDisplayLine; |
26 | extern uint8_t MotorTest[4]; |
26 | extern uint8_t MotorTest[4]; |
27 | extern uint8_t DubWiseKeys[4]; |
27 | extern uint8_t DubWiseKeys[4]; |
28 | 28 | ||
29 | typedef struct |
29 | typedef struct |
30 | { |
30 | { |
31 | uint8_t Digital[2]; |
31 | uint8_t Digital[2]; |
32 | uint16_t Analog[32]; // Debugvalues |
32 | uint16_t Analog[32]; // Debugvalues |
33 | } DebugOut_t; |
33 | } DebugOut_t; |
34 | 34 | ||
35 | extern DebugOut_t DebugOut; |
35 | extern DebugOut_t DebugOut; |
36 | 36 | ||
37 | typedef struct |
37 | typedef struct |
38 | { |
38 | { |
39 | uint8_t Digital[2]; |
39 | uint8_t Digital[2]; |
40 | uint8_t RemoteButtons; |
40 | uint8_t RemoteButtons; |
41 | int8_t Nick; |
41 | int8_t Nick; |
42 | int8_t Roll; |
42 | int8_t Roll; |
43 | int8_t Yaw; |
43 | int8_t Yaw; |
44 | uint8_t Gas; |
44 | uint8_t Gas; |
45 | int8_t Height; |
45 | int8_t Height; |
46 | uint8_t free; |
46 | uint8_t free; |
47 | uint8_t Frame; |
47 | uint8_t Frame; |
48 | uint8_t Config; |
48 | uint8_t Config; |
49 | } ExternControl_t; |
49 | } ExternControl_t; |
50 | 50 | ||
51 | extern ExternControl_t ExternControl; |
51 | extern ExternControl_t ExternControl; |
52 | 52 | ||
53 | typedef struct |
53 | typedef struct |
54 | { |
54 | { |
55 | uint8_t Major; |
55 | uint8_t Major; |
56 | uint8_t Minor; |
56 | uint8_t Minor; |
57 | uint8_t PCCompatible; |
57 | uint8_t PCCompatible; |
- | 58 | uint8_t Hardware; |
|
58 | uint8_t Reserved[7]; |
59 | uint8_t Reserved[6]; |
59 | } VersionInfo_t; |
60 | } VersionInfo_t; |
60 | 61 | ||
61 | extern VersionInfo_t VersionInfo; |
62 | extern VersionInfo_t VersionInfo; |
62 | 63 | ||
63 | #endif //_UART_H |
64 | #endif //_UART_H |
64 | 65 |