Subversion Repositories Projects

Rev

Rev 762 | Rev 835 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 762 Rev 783
Line 21... Line 21...
21
#ifndef _USART1_H
21
#ifndef _USART1_H
22
#define _USART1_H
22
#define _USART1_H
Line 23... Line 23...
23
 
23
 
Line 24... Line 24...
24
#define baud 57600
24
#define baud 57600
25
 
25
 
Line 26... Line 26...
26
#define RXD_BUFFER_LEN          150
26
#define RXD_BUFFER_LEN          160
27
#define TXD_BUFFER_LEN          20 // not so much needed
27
#define TXD_BUFFER_LEN          20 // not so much needed
28
 
28
 
-
 
29
//#define REQUEST_OSD_DATA "#aoAm==EX\r" 
-
 
30
#define REQUEST_OSD_DATA "#bo?]==EG\r"
29
//#define REQUEST_OSD_DATA "#aoAm==EX\r" 
31
#define REQUEST_DBG_DATA "#ad?]==D{\r"
30
#define REQUEST_OSD_DATA "#bo?]==EG\r"
32
#define REQUEST_DBG_DISABLE "#ad====DY\r"
Line -... Line 33...
-
 
33
 
-
 
34
#define REQUEST_FC_VERSION "#av====Dk\r"
-
 
35
#define REQUEST_NC_VERSION "#bv====Dl\r"
-
 
36
 
-
 
37
#define REQUEST_CURRENT_SETTING "#bq|nZBFy\r"
-
 
38
 
31
#define REQUEST_DBG_DATA "#ad?]==D{\r"
39
#define REQUEST_UART_TO_FC "#cu=IfREv\r"
32
#define REQUEST_FC_VERSION "#av====Dk\r"
40
 
33
#define REQUEST_NC_VERSION "#bv====Dl\r"
41
 
34
 
42
 
35
extern volatile uint8_t rxd_buffer_locked;
43
extern volatile uint8_t rxd_buffer_locked;
36
extern volatile uint8_t rxd_buffer[RXD_BUFFER_LEN];
44
extern volatile uint8_t rxd_buffer[RXD_BUFFER_LEN];
Line 37... Line 45...
37
extern volatile uint8_t txd_buffer[TXD_BUFFER_LEN];
45
//extern volatile uint8_t txd_buffer[TXD_BUFFER_LEN];
Line 77... Line 85...
77
 * portions taken and adapted from
85
 * portions taken and adapted from
78
 * http://svn.mikrokopter.de/mikrowebsvn/filedetails.php?repname=FlightCtrl&path=%2Ftags%2FV0.72p%2Fuart.c
86
 * http://svn.mikrokopter.de/mikrowebsvn/filedetails.php?repname=FlightCtrl&path=%2Ftags%2FV0.72p%2Fuart.c
79
 */
87
 */
80
void Decode64(void);
88
void Decode64(void);
Line -... Line 89...
-
 
89
 
-
 
90
/**
-
 
91
 * Request Data through usart1 until a answer is received
-
 
92
 */
-
 
93
void usart1_request_blocking(unsigned char answer, const char* message);
-
 
94
 
-
 
95
/**
-
 
96
 * Request UART Redirect from NC to itself
-
 
97
 */
-
 
98
void usart1_request_nc_uart(void);
81
 
99
 
82
/**
100
/**
83
 * request Data through USART in special MK format by adding checksum and
101
 * request Data through USART in special MK format by adding checksum and
84
 * encode data in modified Base64
102
 * encode data in modified Base64
85
 * portions taken and adapted from
103
 * portions taken and adapted from