1 //------------------------------------------------------------------------------ 2 // Copyright 2012 (c) Silicon Laboratories Inc. 3 // 4 // SPDX-License-Identifier: Zlib 5 // 6 // This siHAL software is provided 'as-is', without any express or implied 7 // warranty. In no event will the authors be held liable for any damages 8 // arising from the use of this software. 9 // 10 // Permission is granted to anyone to use this software for any purpose, 11 // including commercial applications, and to alter it and redistribute it 12 // freely, subject to the following restrictions: 13 // 14 // 1. The origin of this software must not be misrepresented; you must not 15 // claim that you wrote the original software. If you use this software 16 // in a product, an acknowledgment in the product documentation would be 17 // appreciated but is not required. 18 // 2. Altered source versions must be plainly marked as such, and must not be 19 // misrepresented as being the original software. 20 // 3. This notice may not be removed or altered from any source distribution. 21 //------------------------------------------------------------------------------ 22 23 // Version: 1 24 25 #ifndef __SI32_USART_B_SUPPORT_H__ 26 #define __SI32_USART_B_SUPPORT_H__ 27 28 #include <stdint.h> 29 30 #ifdef __cplusplus 31 extern "C" { 32 #endif 33 34 //----------------------------------------------------------------------------- 35 // Define Stop Bits Enum type 36 37 typedef enum SI32_USART_STOP_BITS_Enum 38 { 39 SI32_USART_B_STOP_BITS_0P5_BIT = 0, 40 SI32_USART_B_STOP_BITS_1_BIT = 1, 41 SI32_USART_B_STOP_BITS_1P5_BITS = 2, 42 SI32_USART_B_STOP_BITS_2_BITS = 3 43 } SI32_USART_B_STOP_BITS_Enum_Type; 44 45 //----------------------------------------------------------------------------- 46 // Define Parity Enum type 47 48 typedef enum SI32_USART_B_PARITY_Enum 49 { 50 SI32_USART_B_PARITY_ODD = 0, 51 SI32_USART_B_PARITY_EVEN = 1, 52 SI32_USART_B_PARITY_SET = 2, 53 SI32_USART_B_PARITY_CLEAR = 3 54 } SI32_USART_B_PARITY_Enum_Type; 55 56 //----------------------------------------------------------------------------- 57 // Define Data Length Enum type 58 59 typedef enum SI32_USART_B_DATA_LENGTH_Enum 60 { 61 SI32_USART_B_DATA_LENGTH_5_BITS = 5, 62 SI32_USART_B_DATA_LENGTH_6_BITS = 6, 63 SI32_USART_B_DATA_LENGTH_7_BITS = 7, 64 SI32_USART_B_DATA_LENGTH_8_BITS = 8, 65 SI32_USART_B_DATA_LENGTH_9_BITS_NORMAL = 9, 66 SI32_USART_B_DATA_LENGTH_9_BITS_STORED = 9, 67 SI32_USART_B_DATA_LENGTH_9_BITS_FIXED = 10, 68 SI32_USART_B_DATA_LENGTH_9_BITS_MATCH = 10 69 } SI32_USART_B_DATA_LENGTH_Enum_Type; 70 71 72 //----------------------------------------------------------------------------- 73 // Define IrDA Pulse Width Enum type 74 75 typedef enum SI32_USART_B_IRDA_PULSE_WIDTH_Enum 76 { 77 SI32_USART_B_IRDA_PULSE_WIDTH_1_16TH = 0, 78 SI32_USART_B_IRDA_PULSE_WIDTH_1_8TH = 1, 79 SI32_USART_B_IRDA_PULSE_WIDTH_3_16TH = 2, 80 SI32_USART_B_IRDA_PULSE_WIDTH_1_4TH = 3 81 } SI32_USART_B_IRDA_PULSE_WIDTH_Enum_Type; 82 83 #ifdef __cplusplus 84 } 85 #endif 86 87 #endif // __SI32_USART_B_SUPPORT_H__ 88 89 //-eof-------------------------------------------------------------------------- 90