Subversion Repositories Projects

Rev

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

Rev 331 Rev 346
Line 21... Line 21...
21
#define baud 57600
21
#define baud 57600
Line 22... Line 22...
22
 
22
 
23
#define RXD_BUFFER_LEN          150
23
#define RXD_BUFFER_LEN          150
Line -... Line 24...
-
 
24
#define TXD_BUFFER_LEN          150
-
 
25
 
-
 
26
extern volatile uint8_t rxd_buffer_locked;
-
 
27
extern volatile uint8_t rxd_buffer[RXD_BUFFER_LEN];
-
 
28
extern volatile uint8_t txd_buffer[TXD_BUFFER_LEN];
-
 
29
extern volatile uint8_t ReceivedBytes;
-
 
30
extern volatile uint8_t *pRxData;
-
 
31
extern volatile uint8_t RxDataLen;
-
 
32
 
-
 
33
extern
-
 
34
 
-
 
35
/**
-
 
36
 * init usart1
-
 
37
 */
24
#define TXD_BUFFER_LEN          150
38
void usart1_init();
25
 
39
 
26
/**
40
/**
27
 * disable the txd pin of usart1
41
 * disable the txd pin of usart1
Line 28... Line 42...
28
 */
42
 */
29
void usart1_DisableTXD(void);
43
void usart1_DisableTXD(void);
30
 
44
 
31
/**
45
/**
-
 
46
 * enable the txd pin of usart1
-
 
47
 */
-
 
48
void usart1_EnableTXD(void);
-
 
49
 
-
 
50
/**
-
 
51
 * send a <string> throught usart1
-
 
52
 */
-
 
53
void usart1_puts(char*);
-
 
54
 
-
 
55
/**
-
 
56
 * receive data through usart1
-
 
57
 * portions taken and adapted from
-
 
58
 * http://svn.mikrokopter.de/mikrowebsvn/filedetails.php?repname=FlightCtrl&path=%2Fbranches%2FV0.72p+Code+Redesign+killagreg%2Fuart0.c
-
 
59
 */
-
 
60
ISR(SIG_USART1_RECV);
-
 
61
 
-
 
62
/**
-
 
63
 * Decode the recevied Buffer
-
 
64
 * portions taken and adapted from
-
 
65
 * http://svn.mikrokopter.de/mikrowebsvn/filedetails.php?repname=FlightCtrl&path=%2Ftags%2FV0.72p%2Fuart.c
-
 
66
 */
-
 
67
void Decode64(void);
-
 
68
 
-
 
69
/**
-
 
70
 * request Data through USART in special MK format by adding checksum and
-
 
71
 * encode data in modified Base64
-
 
72
 * portions taken and adapted from
-
 
73
 * http://svn.mikrokopter.de/mikrowebsvn/filedetails.php?repname=FlightCtrl&path=%2Ftags%2FV0.72p%2Fuart.c
-
 
74
 */
-
 
75
void sendMKData(unsigned char, unsigned char, unsigned char*, unsigned char);
-
 
76
 
-
 
77
/**
-
 
78
 * short script to directly send a request thorugh usart including en- and disabling it
-
 
79
 * where <address> is the address of the receipient, <label> is which data set to request