-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUSART.h
More file actions
40 lines (30 loc) · 789 Bytes
/
USART.h
File metadata and controls
40 lines (30 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* Terminal.h
*
* Created: 02-03-2015 15:05:20
* Author: Zé
*/
#ifndef TERMINAL_H_
#define TERMINAL_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <stdio.h>
#define INPUT_BUFFER_LENGTH 16
#define OUTPUT_BUFFER_LENGTH 256
#define BAUDRATE 500000
extern char input_buffer[INPUT_BUFFER_LENGTH];
extern char aux_buffer[INPUT_BUFFER_LENGTH];
extern volatile unsigned int istart, iend;
extern char output_buffer[OUTPUT_BUFFER_LENGTH];
extern volatile unsigned int ostart, oend;
extern volatile unsigned char sendactive;
extern volatile unsigned char sendfull;
extern volatile unsigned char TableReady;
void USART_init(void);
void USART_sendData(void *addrs, int datasize ,int n);
void USART_readData(void *addr, int datasize, int n);
#ifdef __cplusplus
}
#endif
#endif