NHS31xx SW API
uarttx_dft.h
1 /*
2  * Copyright 2016,2018-2019 NXP
3  * This software is owned or controlled by NXP and may only be used strictly
4  * in accordance with the applicable license terms. By expressly accepting
5  * such terms or by downloading, installing, activating and/or otherwise using
6  * the software, you are agreeing that you have read, and that you agree to
7  * comply with and are bound by, such license terms. If you do not agree to
8  * be bound by the applicable license terms, then you may not retain, install,
9  * activate or otherwise use the software.
10  */
11 
38 #ifndef __UARTTX_DFT_H_
39 #define __UARTTX_DFT_H_
40 
46 #if !defined(UARTTX_STOPBITS)
47  #define UARTTX_STOPBITS 2
48 #endif
49 
58 #if !defined(UARTTX_BITRATE)
59  #define UARTTX_BITRATE 9600
60 #endif
61 
68 #if !defined(UARTTX_INVERTED)
69  #define UARTTX_INVERTED 0
70 #endif
71 
72 /* ------------------------------------------------------------------------- */
73 
78 #if !defined(UARTTX_DEC_END_CHAR)
79  #define UARTTX_DEC_END_CHAR '\n'
80 #endif
81 
86 #if !defined(UARTTX_HEX_END_CHAR)
87  #define UARTTX_HEX_END_CHAR '\n'
88 #endif
89 
96 #if !defined(UARTTX_ENABLE_SHORTHANDS)
97  #ifdef DEBUG
98  #define UARTTX_ENABLE_SHORTHANDS 1
99  #else
100  #define UARTTX_ENABLE_SHORTHANDS 0
101  #endif
102 #endif
103 #if UARTTX_ENABLE_SHORTHANDS
104  #define PRINTD(n) UartTx_PrintDec(n, UARTTX_DEC_END_CHAR)
105  #define PRINTH(n) UartTx_PrintHex(n, UARTTX_HEX_END_CHAR)
106  #define PRINTS(s) UartTx_PrintString(s)
107  #define PRINTF(...) UartTx_Printf(__VA_ARGS__)
108 #else
109  #define PRINTD(n) do {} while(0)
110  #define PRINTH(n) do {} while(0)
111  #define PRINTS(s) do {} while(0)
112  #define PRINTF(...) do {} while(0)
113 #endif
114 
115 #endif