Rev 1955 | Rev 2051 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1612 | dongfang | 1 | #ifndef _UART0_H |
2 | #define _UART0_H |
||
3 | |||
4 | #define RXD_BUFFER_LEN 150 |
||
5 | // must be at least 4('#'+Addr+'CmdID'+'\r')+ (80 * 4)/3 = 111 bytes |
||
6 | #define TXD_BUFFER_LEN 150 |
||
7 | #define RXD_BUFFER_LEN 150 |
||
8 | |||
9 | #include <inttypes.h> |
||
10 | |||
11 | //Baud rate of the USART |
||
12 | #define USART0_BAUD 57600 |
||
13 | |||
2018 | - | 14 | extern void usart0_init(void); |
15 | extern void usart0_transmitTxData(void); |
||
16 | extern void usart0_processRxData(void); |
||
1612 | dongfang | 17 | extern int16_t uart_putchar(int8_t c); |
18 | |||
2018 | - | 19 | // extern uint8_t remotePollDisplayLine; |
1612 | dongfang | 20 | |
21 | extern uint8_t motorTestActive; |
||
22 | extern uint8_t motorTest[16]; |
||
23 | |||
24 | typedef struct { |
||
1955 | - | 25 | uint8_t digital[2]; |
2018 | - | 26 | uint16_t analog[32]; // debug values |
1821 | - | 27 | }__attribute__((packed)) DebugOut_t; |
1612 | dongfang | 28 | |
1955 | - | 29 | extern DebugOut_t debugOut; |
1612 | dongfang | 30 | |
31 | typedef struct { |
||
2018 | - | 32 | int16_t anglePitch; // in 0.1 deg |
33 | int16_t angleRoll; // in 0.1 deg |
||
34 | int16_t heading; // in 0.1 deg |
||
35 | uint8_t reserved[8]; |
||
1821 | - | 36 | }__attribute__((packed)) Data3D_t; |
1612 | dongfang | 37 | |
38 | #endif //_UART0_H |