Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
683 | killagreg | 1 | #ifndef _UART_H |
2 | #define _UART_H |
||
1 | ingob | 3 | |
683 | killagreg | 4 | #define TXD_BUFFER_LEN 150 |
5 | #define RXD_BUFFER_LEN 150 |
||
6 | |||
492 | hbuss | 7 | #define DUB_KEY_UP 4 |
8 | #define DUB_KEY_DOWN 8 |
||
706 | killagreg | 9 | #define DUB_KEY_LEFT 16 |
492 | hbuss | 10 | #define DUB_KEY_RIGHT 32 |
11 | #define DUB_KEY_FIRE 64 |
||
1 | ingob | 12 | |
685 | killagreg | 13 | #include <inttypes.h> |
14 | |||
683 | killagreg | 15 | //Baud rate of the USART |
16 | #define USART0_BAUD 57600 |
||
17 | |||
18 | |||
19 | extern void USART0_Init (void); |
||
735 | killagreg | 20 | extern void TransmitTxData(void); |
21 | extern void ProcessRxData(void); |
||
22 | extern int16_t uart_putchar(int8_t c); |
||
683 | killagreg | 23 | |
735 | killagreg | 24 | extern uint8_t PcAccess; |
25 | extern uint8_t RemotePollDisplayLine; |
||
26 | extern uint8_t MotorTest[4]; |
||
27 | extern uint8_t DubWiseKeys[4]; |
||
683 | killagreg | 28 | |
735 | killagreg | 29 | typedef struct |
1 | ingob | 30 | { |
722 | killagreg | 31 | uint8_t Digital[2]; |
32 | uint16_t Analog[32]; // Debugwerte |
||
735 | killagreg | 33 | } DebugOut_t; |
1 | ingob | 34 | |
735 | killagreg | 35 | extern DebugOut_t DebugOut; |
1 | ingob | 36 | |
735 | killagreg | 37 | typedef struct |
1 | ingob | 38 | { |
701 | killagreg | 39 | uint8_t Digital[2]; |
40 | uint8_t RemoteButtons; |
||
41 | int8_t Pitch; |
||
42 | int8_t Roll; |
||
43 | int8_t Yaw; |
||
707 | killagreg | 44 | uint8_t Thrust; |
701 | killagreg | 45 | int8_t Hight; |
46 | uint8_t free; |
||
47 | uint8_t Frame; |
||
48 | uint8_t Config; |
||
735 | killagreg | 49 | } ExternControl_t; |
1 | ingob | 50 | |
735 | killagreg | 51 | extern ExternControl_t ExternControl; |
52 | |||
53 | typedef struct |
||
1 | ingob | 54 | { |
735 | killagreg | 55 | uint8_t Major; |
56 | uint8_t Minor; |
||
57 | uint8_t PCCompatible; |
||
58 | uint8_t Reserved[7]; |
||
59 | } VersionInfo_t; |
||
1 | ingob | 60 | |
735 | killagreg | 61 | extern VersionInfo_t VersionInfo; |
1 | ingob | 62 | |
735 | killagreg | 63 | |
1 | ingob | 64 | #endif //_UART_H |