Rev 2055 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2055 | Rev 2159 | ||
---|---|---|---|
1 | #ifndef _UART0_H |
1 | #ifndef _UART0_H |
2 | #define _UART0_H |
2 | #define _UART0_H |
3 | 3 | ||
4 | #define TXD_BUFFER_LEN 180 |
4 | #define TXD_BUFFER_LEN 150 |
5 | #define RXD_BUFFER_LEN 180 |
5 | #define RXD_BUFFER_LEN 150 |
6 | 6 | ||
7 | #include <inttypes.h> |
7 | #include <inttypes.h> |
8 | #include "ubx.h" |
8 | #include "ubx.h" |
9 | 9 | ||
10 | //Baud rate of the USART |
10 | //Baud rate of the USART |
11 | #define USART0_BAUD 57600 |
11 | #define USART0_BAUD 57600 |
12 | 12 | ||
13 | extern void usart0_init(void); |
13 | extern void usart0_init(void); |
14 | extern void usart0_transmitTxData(void); |
14 | extern void usart0_transmitTxData(void); |
15 | extern void usart0_processRxData(void); |
15 | extern void usart0_processRxData(void); |
16 | extern int16_t uart_putchar(int8_t c); |
16 | extern int16_t uart_putchar(int8_t c); |
17 | 17 | ||
18 | // extern uint8_t remotePollDisplayLine; |
18 | // extern uint8_t remotePollDisplayLine; |
19 | 19 | ||
20 | extern uint8_t motorTestActive; |
20 | extern uint8_t motorTestActive; |
21 | extern uint8_t motorTest[16]; |
21 | extern uint8_t motorTest[16]; |
22 | 22 | ||
23 | typedef struct { |
23 | typedef struct { |
24 | int16_t anglePitch; // in 0.1 deg |
24 | int16_t anglePitch; // in 0.1 deg |
25 | int16_t angleRoll; // in 0.1 deg |
25 | int16_t angleRoll; // in 0.1 deg |
26 | int16_t heading; // in 0.1 deg |
26 | int16_t heading; // in 0.1 deg |
27 | uint8_t reserved[8]; |
27 | uint8_t reserved[8]; |
28 | }__attribute__((packed)) Data3D_t; |
28 | }__attribute__((packed)) Data3D_t; |
29 | 29 | ||
30 | typedef struct { |
30 | typedef struct { |
31 | Data3D_t attitude; |
31 | Data3D_t attitude; |
32 | GPS_INFO_t GPSInfo; |
32 | GPS_INFO_t GPSInfo; |
33 | int32_t airpressureHeight; |
33 | int32_t airpressureHeight; |
34 | int16_t batteryVoltage; |
34 | int16_t batteryVoltage; |
35 | }__attribute__((packed)) OSDData_t; |
35 | }__attribute__((packed)) OSDData_t; |
36 | 36 | ||
37 | #endif //_UART0_H |
37 | #endif //_UART0_H |
38 | 38 |