VT Library  0.2
C:/Users/joni/Code/projects/nrf_vt/nrf_vt/nrf_vt_constants.h
1 #ifndef __NRF_VT_CONSTANTS_H_
2 #define __NRF_VT_CONSTANTS_H_
3 
4 #include "sdk_config.h"
5 
6 #if defined(NRF_VT_ENABLED) && NRF_VT_ENABLED
7 
8 #ifdef NRF_VT_FRONTEND
9 
10 #if NRF_VT_FRONTEND == 0 // UART frontend configuration
11 
12 #define _VT_START_BIT_VALUE (0)
13 #define _VT_START_BITS (1)
14 #define _VT_STOP_BIT_VALUE (1)
15 #define _VT_STOP_BITS (1)
16 #define _VT_END_DELAY (1)
17 #define _VT_DEFAULT_LINE_VALUE (1)
18 #define _VT_LSBIT_FIRST (1)
19 
20 #else
21 #error "Frontend not supported"
22 #endif
23 
24 #else
25 
26 // Manual configuration
27 
28 #ifdef NRF_VT_START_BIT_VALUE
29 #define _VT_START_BIT_VALUE (NRF_VT_START_BIT_VALUE)
30 #else
31 #error "No start bit value set"
32 #endif
33 
34 #ifdef NRF_VT_START_BITS
35 #define _VT_START_BITS (NRF_VT_START_BITS)
36 #else
37 #error "No start bit count set"
38 #endif
39 
40 #ifdef NRF_VT_STOP_BIT_VALUE
41 #define _VT_STOP_BIT_VALUE (NRF_VT_STOP_BIT_VALUE)
42 #else
43 #error "No stop bit value set"
44 #endif
45 
46 #ifdef NRF_VT_STOP_BITS
47 #define _VT_STOP_BITS (NRF_VT_STOP_BITS)
48 #else
49 #error "No stop bit count set"
50 #endif
51 
52 #ifdef NRF_VT_END_DELAY
53 #define _VT_END_DELAY (NRF_VT_END_DELAY)
54 #else
55 #error "No end delay set"
56 #endif
57 
58 #ifdef NRF_VT_DEFAULT_LINE_VALUE
59 #define _VT_DEFAULT_LINE_VALUE (NRF_VT_DEFAULT_LINE_VALUE)
60 #else
61 #error "No default line value set"
62 #endif
63 
64 #ifdef NRF_VT_LSBIT_FIRST
65 #define _VT_LSBIT_FIRST (NRF_VT_LSBIT_FIRST)
66 #else
67 #error "LSBIT / MSBIT not configured"
68 #endif
69 
70 
71 #endif // NRF_VT_FRONTEND
72 
73 #endif // defined(NRF_VT_ENABLED) && NRF_VT_ENABLED
74 
75 #endif //__NRF_VT_CONSTANTS_H_