RCOM PROJ
File transfer via serial port
macros.h
Go to the documentation of this file.
1
4
#ifndef MACROS_HEADER
5
#define MACROS_HEADER
6
7
/*-----------Variables-----------*/
8
9
#define BAUDRATE B50
10
#define TIME_OUT 3
11
#define ATTEMPTS 5
12
#define MAX_SIZE 1024 // Tamanho máximo em bytes dos dados da trama I === Tamanho máximo do pacote de dados
13
// entre 24-inf
14
15
#define PROBABILITY_BCC2 0 //percentage
16
#define PROBABILITY_BCC1 0 //percentage
17
#define T_PROP_DELAY 0
18
23
#define SU_FRAME_SIZE 5
24
25
#define FLAG 0b01111110
26
27
#define A_ER 0b00000011
28
#define A_RE 0b00000001
29
30
#define C_SET 0b00000011
31
#define C_DISC 0b00001011
32
#define C_UA 0b00000111
33
#define C_RR(r) ((0b00000101) ^ (r) << (7))
34
#define C_REJ(r) ((0b00000001) ^ (r) << (7))
35
#define C_I(r) ((0b01000000) & (r) << (6))
36
37
#define BCC(a,c) (a ^ c)
38
39
40
#define FALSE 0
41
#define TRUE 1
42
43
// valores de type usados em application.c
44
#define TRANSMITTER 1
45
#define RECEIVER 0
46
47
/*-------package control--------*/
48
49
//C flag
50
#define DATA 0x01
51
#define START 0x02
52
#define END 0x03
53
54
//T flag
55
#define T_SIZE 0x00
56
#define T_NAME 0x01
57
58
59
#define MAX_SIZE_AFT_STUFF 2*MAX_SIZE
60
#endif // MACROS_HEADER
61
src
macros.h
Generated on Sun Nov 8 2020 18:13:37 for RCOM PROJ by
1.8.17