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
23
 
23
 
24
#define baud 57600
24
#define baud 57600
25
 
25
 
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" 
29
//#define REQUEST_OSD_DATA "#aoAm==EX\r" 
30
#define REQUEST_OSD_DATA "#bo?]==EG\r"
30
#define REQUEST_OSD_DATA "#bo?]==EG\r"
31
#define REQUEST_DBG_DATA "#ad?]==D{\r"
31
#define REQUEST_DBG_DATA "#ad?]==D{\r"
-
 
32
#define REQUEST_DBG_DISABLE "#ad====DY\r"
-
 
33
 
32
#define REQUEST_FC_VERSION "#av====Dk\r"
34
#define REQUEST_FC_VERSION "#av====Dk\r"
33
#define REQUEST_NC_VERSION "#bv====Dl\r"
35
#define REQUEST_NC_VERSION "#bv====Dl\r"
34
 
36
 
-
 
37
#define REQUEST_CURRENT_SETTING "#bq|nZBFy\r"
-
 
38
 
-
 
39
#define REQUEST_UART_TO_FC "#cu=IfREv\r"
-
 
40
 
-
 
41
 
-
 
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];
37
extern volatile uint8_t txd_buffer[TXD_BUFFER_LEN];
45
//extern volatile uint8_t txd_buffer[TXD_BUFFER_LEN];
38
extern volatile uint8_t ReceivedBytes;
46
extern volatile uint8_t ReceivedBytes;
39
extern volatile uint8_t *pRxData;
47
extern volatile uint8_t *pRxData;
40
extern volatile uint8_t RxDataLen;
48
extern volatile uint8_t RxDataLen;
41
 
49
 
42
/**
50
/**
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);
81
 
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);
-
 
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
86
 * http://svn.mikrokopter.de/mikrowebsvn/filedetails.php?repname=FlightCtrl&path=%2Ftags%2FV0.72p%2Fuart.c
104
 * http://svn.mikrokopter.de/mikrowebsvn/filedetails.php?repname=FlightCtrl&path=%2Ftags%2FV0.72p%2Fuart.c