Rev 2018 | Rev 2052 | 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 | |||
2051 | - | 4 | #define TXD_BUFFER_LEN 180 |
5 | #define RXD_BUFFER_LEN 180 |
||
1612 | dongfang | 6 | |
7 | #include <inttypes.h> |
||
8 | |||
9 | //Baud rate of the USART |
||
10 | #define USART0_BAUD 57600 |
||
11 | |||
2018 | - | 12 | extern void usart0_init(void); |
13 | extern void usart0_transmitTxData(void); |
||
14 | extern void usart0_processRxData(void); |
||
1612 | dongfang | 15 | extern int16_t uart_putchar(int8_t c); |
16 | |||
2018 | - | 17 | // extern uint8_t remotePollDisplayLine; |
1612 | dongfang | 18 | |
19 | extern uint8_t motorTestActive; |
||
20 | extern uint8_t motorTest[16]; |
||
21 | |||
22 | typedef struct { |
||
1955 | - | 23 | uint8_t digital[2]; |
2018 | - | 24 | uint16_t analog[32]; // debug values |
1821 | - | 25 | }__attribute__((packed)) DebugOut_t; |
1612 | dongfang | 26 | |
1955 | - | 27 | extern DebugOut_t debugOut; |
1612 | dongfang | 28 | |
29 | typedef struct { |
||
2018 | - | 30 | int16_t anglePitch; // in 0.1 deg |
31 | int16_t angleRoll; // in 0.1 deg |
||
32 | int16_t heading; // in 0.1 deg |
||
33 | uint8_t reserved[8]; |
||
1821 | - | 34 | }__attribute__((packed)) Data3D_t; |
1612 | dongfang | 35 | |
36 | #endif //_UART0_H |