Rev 21 | Rev 29 | 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); |
||
21 | killagreg | 21 | int uart_putchar (int8_t c); |
19 | killagreg | 22 | |
23 | |||
24 | |||
23 | killagreg | 25 | struct DebugOut_t |
1 | ingob | 26 | { |
19 | killagreg | 27 | uint8_t Digital[2]; |
28 | uint16_t Analog[32]; // Debugvalues |
||
23 | killagreg | 29 | } ; |
1 | ingob | 30 | |
23 | killagreg | 31 | extern struct DebugOut_t DebugOut; |
1 | ingob | 32 | |
33 | |||
34 | |||
23 | killagreg | 35 | struct ExternData_t |
19 | killagreg | 36 | { |
37 | int16_t Attitude[2]; // nock and roll angle in 0.1 deg |
||
38 | uint8_t UserParam[2]; |
||
39 | uint8_t CalState; |
||
40 | uint8_t Orientation; |
||
23 | killagreg | 41 | } ; |
1 | ingob | 42 | |
23 | killagreg | 43 | extern struct ExternData_t ExternData; |
1 | ingob | 44 | |
45 | |||
23 | killagreg | 46 | struct ExternControl_t |
19 | killagreg | 47 | { |
48 | uint8_t Digital[2]; |
||
49 | uint8_t RemoteButtons; |
||
50 | int8_t Nick; |
||
51 | int8_t Roll; |
||
52 | int8_t Yaw; |
||
53 | uint8_t Gas; |
||
54 | int8_t Height; |
||
55 | uint8_t Par1; |
||
56 | uint8_t Par2; |
||
57 | uint8_t Par3; |
||
23 | killagreg | 58 | } ; |
1 | ingob | 59 | |
23 | killagreg | 60 | extern struct ExternControl_t ExternControl; |
1 | ingob | 61 | |
62 | |||
23 | killagreg | 63 | struct VersionInfo_t |
19 | killagreg | 64 | { |
65 | uint8_t Major; |
||
66 | uint8_t Minor; |
||
67 | uint8_t PCCompatible; |
||
68 | uint8_t Reserved[7]; |
||
69 | } VersionInfo_t; |
||
1 | ingob | 70 | |
23 | killagreg | 71 | extern struct VersionInfo_t VersionInfo; |
19 | killagreg | 72 | |
73 | |||
74 | #endif //_UART_H_ |