Rev 1561 | Rev 1702 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1561 | Rev 1685 | ||
---|---|---|---|
1 | #ifndef _UART_H |
1 | #ifndef _UART_H |
2 | #define _UART_H |
2 | #define _UART_H |
3 | 3 | ||
4 | #define printf_P(format, args...) _printf_P(&uart_putchar, format , ## args) |
4 | #define printf_P(format, args...) _printf_P(&uart_putchar, format , ## args) |
5 | #define printf(format, args...) _printf_P(&uart_putchar, PSTR(format) , ## args) |
5 | #define printf(format, args...) _printf_P(&uart_putchar, PSTR(format) , ## args) |
6 | 6 | ||
7 | void BearbeiteRxDaten(void); |
7 | void BearbeiteRxDaten(void); |
8 | 8 | ||
9 | extern unsigned char DebugGetAnforderung; |
9 | extern unsigned char DebugGetAnforderung; |
10 | 10 | ||
11 | extern unsigned volatile char UebertragungAbgeschlossen; |
11 | extern unsigned volatile char UebertragungAbgeschlossen; |
12 | extern unsigned volatile char PC_DebugTimeout; |
12 | extern unsigned volatile char PC_DebugTimeout; |
13 | extern unsigned volatile char NeueKoordinateEmpfangen; |
13 | extern unsigned volatile char NeueKoordinateEmpfangen; |
14 | extern unsigned volatile char PC_MotortestActive; |
14 | extern unsigned volatile char PC_MotortestActive; |
15 | extern unsigned char MeineSlaveAdresse; |
15 | extern unsigned char MeineSlaveAdresse; |
16 | extern unsigned char PcZugriff; |
16 | extern unsigned char PcZugriff; |
17 | extern unsigned char RemotePollDisplayLine; |
17 | extern unsigned char RemotePollDisplayLine; |
18 | extern int Debug_Timer,Kompass_Timer; |
18 | extern int Debug_Timer,Kompass_Timer; |
19 | extern void UART_Init (void); |
19 | extern void UART_Init (void); |
20 | extern void uart_putchar (char c); |
20 | extern void uart_putchar (char c); |
21 | extern void boot_program_page (uint32_t page, uint8_t *buf); |
21 | extern void boot_program_page (uint32_t page, uint8_t *buf); |
22 | extern void DatenUebertragung(void); |
22 | extern void DatenUebertragung(void); |
23 | extern void Uart1Init(void); |
23 | extern void Uart1Init(void); |
24 | extern void BearbeiteRxDaten(void); |
24 | extern void BearbeiteRxDaten(void); |
25 | extern unsigned char MotorTest[16]; |
25 | extern unsigned char MotorTest[16]; |
26 | struct str_DebugOut |
26 | struct str_DebugOut |
27 | { |
27 | { |
28 | unsigned char Digital[2]; |
28 | unsigned char Digital[2]; |
29 | signed int Analog[32]; // Debugwerte |
29 | signed int Analog[32]; // Debugwerte |
30 | }; |
30 | }; |
31 | 31 | ||
32 | extern struct str_DebugOut DebugOut; |
32 | extern struct str_DebugOut DebugOut; |
33 | 33 | ||
34 | struct str_WinkelOut |
34 | struct str_WinkelOut |
35 | { |
35 | { |
36 | signed int Winkel[2]; |
36 | signed int Winkel[2]; |
37 | unsigned char UserParameter[2]; |
37 | unsigned char UserParameter[2]; |
38 | unsigned char CalcState; |
38 | unsigned char CalcState; |
39 | unsigned char Orientation; |
39 | unsigned char Orientation; |
40 | }; |
40 | }; |
41 | extern struct str_WinkelOut WinkelOut; |
41 | extern struct str_WinkelOut WinkelOut; |
42 | 42 | ||
43 | struct str_Data3D |
43 | struct str_Data3D |
44 | { |
44 | { |
45 | signed int Winkel[3]; // nick, roll, compass in 0,1° |
45 | signed int Winkel[3]; // nick, roll, compass in 0,1° |
- | 46 | signed char Centroid[3]; |
|
46 | signed char reserve[8]; |
47 | signed char reserve[5]; |
47 | }; |
48 | }; |
48 | extern struct str_Data3D Data3D; |
49 | extern struct str_Data3D Data3D; |
49 | 50 | ||
50 | struct str_ExternControl |
51 | struct str_ExternControl |
51 | { |
52 | { |
52 | unsigned char Digital[2]; |
53 | unsigned char Digital[2]; |
53 | unsigned char RemoteTasten; |
54 | unsigned char RemoteTasten; |
54 | signed char Nick; |
55 | signed char Nick; |
55 | signed char Roll; |
56 | signed char Roll; |
56 | signed char Gier; |
57 | signed char Gier; |
57 | unsigned char Gas; |
58 | unsigned char Gas; |
58 | signed char Hight; |
59 | signed char Hight; |
59 | unsigned char free; |
60 | unsigned char free; |
60 | unsigned char Frame; |
61 | unsigned char Frame; |
61 | unsigned char Config; |
62 | unsigned char Config; |
62 | }; |
63 | }; |
63 | extern struct str_ExternControl ExternControl; |
64 | extern struct str_ExternControl ExternControl; |
64 | 65 | ||
65 | struct str_VersionInfo |
66 | struct str_VersionInfo |
66 | { |
67 | { |
67 | unsigned char SWMajor; |
68 | unsigned char SWMajor; |
68 | unsigned char SWMinor; |
69 | unsigned char SWMinor; |
69 | unsigned char ProtoMajor; |
70 | unsigned char ProtoMajor; |
70 | unsigned char ProtoMinor; |
71 | unsigned char ProtoMinor; |
71 | unsigned char SWPatch; |
72 | unsigned char SWPatch; |
72 | unsigned char Reserved[5]; |
73 | unsigned char Reserved[5]; |
73 | }; |
74 | }; |
74 | extern struct str_VersionInfo VersionInfo; |
75 | extern struct str_VersionInfo VersionInfo; |
75 | 76 | ||
76 | //#define USART0_BAUD 9600 |
77 | //#define USART0_BAUD 9600 |
77 | //#define USART0_BAUD 14400 |
78 | //#define USART0_BAUD 14400 |
78 | //#define USART0_BAUD 28800 |
79 | //#define USART0_BAUD 28800 |
79 | //#define USART0_BAUD 38400 |
80 | //#define USART0_BAUD 38400 |
80 | #define USART0_BAUD 57600 |
81 | #define USART0_BAUD 57600 |
81 | 82 | ||
82 | 83 | ||
83 | #endif //_UART_H |
84 | #endif //_UART_H |
84 | 85 |