Rev 26 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
19 | killagreg | 1 | #ifndef _UART_H_ |
2 | #define _UART_H_ |
||
1 | ingob | 3 | |
19 | killagreg | 4 | #include <inttypes.h> |
1 | ingob | 5 | |
3 | ingob | 6 | #define NICK 0 |
7 | #define ROLL 1 |
||
1 | ingob | 8 | |
9 | |||
19 | killagreg | 10 | #define BAUD_RATE 57600 |
1 | ingob | 11 | |
19 | killagreg | 12 | |
13 | extern uint16_t Debug_Timer; |
||
14 | |||
15 | |||
16 | void USART0_Init (void); |
||
17 | void USART0_EnableTXD(void); |
||
18 | void USART0_DisableTXD(void); |
||
19 | void USART0_TransmitTxData(void); |
||
20 | void USART0_ProcessRxData(void); |
||
29 | killagreg | 21 | int16_t USART0_putchar(int8_t c); |
22 | void USART0_Print(int8_t *msg); |
||
19 | killagreg | 23 | |
24 | |||
25 | |||
23 | killagreg | 26 | struct DebugOut_t |
1 | ingob | 27 | { |
19 | killagreg | 28 | uint8_t Digital[2]; |
29 | uint16_t Analog[32]; // Debugvalues |
||
23 | killagreg | 30 | } ; |
1 | ingob | 31 | |
23 | killagreg | 32 | extern struct DebugOut_t DebugOut; |
1 | ingob | 33 | |
34 | |||
35 | |||
23 | killagreg | 36 | struct ExternData_t |
19 | killagreg | 37 | { |
26 | killagreg | 38 | int16_t Attitude[2]; // nick and roll angle in 0.1 deg |
19 | killagreg | 39 | uint8_t UserParam[2]; |
40 | uint8_t CalState; |
||
41 | uint8_t Orientation; |
||
23 | killagreg | 42 | } ; |
1 | ingob | 43 | |
23 | killagreg | 44 | extern struct ExternData_t ExternData; |
1 | ingob | 45 | |
46 | |||
23 | killagreg | 47 | struct ExternControl_t |
19 | killagreg | 48 | { |
49 | uint8_t Digital[2]; |
||
50 | uint8_t RemoteButtons; |
||
51 | int8_t Nick; |
||
52 | int8_t Roll; |
||
53 | int8_t Yaw; |
||
54 | uint8_t Gas; |
||
55 | int8_t Height; |
||
56 | uint8_t Par1; |
||
57 | uint8_t Par2; |
||
58 | uint8_t Par3; |
||
23 | killagreg | 59 | } ; |
1 | ingob | 60 | |
23 | killagreg | 61 | extern struct ExternControl_t ExternControl; |
1 | ingob | 62 | |
63 | |||
23 | killagreg | 64 | struct VersionInfo_t |
19 | killagreg | 65 | { |
66 | uint8_t Major; |
||
67 | uint8_t Minor; |
||
68 | uint8_t PCCompatible; |
||
69 | uint8_t Reserved[7]; |
||
70 | } VersionInfo_t; |
||
1 | ingob | 71 | |
23 | killagreg | 72 | extern struct VersionInfo_t VersionInfo; |
19 | killagreg | 73 | |
29 | killagreg | 74 | extern uint8_t PC_Connected; |
75 | extern uint8_t FC_Connected; |
||
19 | killagreg | 76 | |
77 | #endif //_UART_H_ |