1 /*********************************************************************************************************//**
2  * @file    ht32f5xxxx_tm_type.h
3  * @version $Rev:: 7319         $
4  * @date    $Date:: 2023-10-28 #$
5  * @brief   The header file of the TM library.
6  *************************************************************************************************************
7  * @attention
8  *
9  * Firmware Disclaimer Information
10  *
11  * 1. The customer hereby acknowledges and agrees that the program technical documentation, including the
12  *    code, which is supplied by Holtek Semiconductor Inc., (hereinafter referred to as "HOLTEK") is the
13  *    proprietary and confidential intellectual property of HOLTEK, and is protected by copyright law and
14  *    other intellectual property laws.
15  *
16  * 2. The customer hereby acknowledges and agrees that the program technical documentation, including the
17  *    code, is confidential information belonging to HOLTEK, and must not be disclosed to any third parties
18  *    other than HOLTEK and the customer.
19  *
20  * 3. The program technical documentation, including the code, is provided "as is" and for customer reference
21  *    only. After delivery by HOLTEK, the customer shall use the program technical documentation, including
22  *    the code, at their own risk. HOLTEK disclaims any expressed, implied or statutory warranties, including
23  *    the warranties of merchantability, satisfactory quality and fitness for a particular purpose.
24  *
25  * <h2><center>Copyright (C) Holtek Semiconductor Inc. All rights reserved</center></h2>
26  ************************************************************************************************************/
27 
28 /* Define to prevent recursive inclusion -------------------------------------------------------------------*/
29 #ifndef __HT32F5XXXX_TM_TYPE_H
30 #define __HT32F5XXXX_TM_TYPE_H
31 
32 #ifdef __cplusplus
33  extern "C" {
34 #endif
35 
36 /* Includes ------------------------------------------------------------------------------------------------*/
37 #include "ht32.h"
38 
39 /** @addtogroup HT32F5xxxx_Peripheral_Driver HT32F5xxxx Peripheral Driver
40   * @{
41   */
42 
43 /** @addtogroup TM
44   * @{
45   */
46 
47 
48 /* Exported types ------------------------------------------------------------------------------------------*/
49 /** @defgroup TM_Exported_Types TM exported types
50   * @{
51   */
52 /**
53  * @brief Enumeration of TM channel.
54  */
55 typedef enum
56 {
57   TM_CH_0 = 0,                    /*!< TM channel 0                                                         */
58   TM_CH_1,                        /*!< TM channel 1                                                         */
59   TM_CH_2,                        /*!< TM channel 2                                                         */
60   TM_CH_3,                        /*!< TM channel 3                                                         */
61 #if (LIBCFG_PWM_8_CHANNEL)
62   TM_CH_4,                        /*!< TM channel 4                                                         */
63   TM_CH_5,                        /*!< TM channel 5                                                         */
64   TM_CH_6,                        /*!< TM channel 6                                                         */
65   TM_CH_7,                        /*!< TM channel 7                                                         */
66 #endif
67 } TM_CH_Enum;
68 /**
69  * @brief Enumeration of TM channel control.
70  */
71 typedef enum
72 {
73   TM_CHCTL_DISABLE = 0,           /*!< TM channel disable                                                   */
74   TM_CHCTL_ENABLE                 /*!< TM channel enable                                                    */
75 } TM_CHCTL_Enum;
76 /**
77  * @brief Enumeration of TM channel polarity.
78  */
79 typedef enum
80 {
81   TM_CHP_NONINVERTED = 0,         /*!< TM channel polarity is active high or rising edge                    */
82   TM_CHP_INVERTED                 /*!< TM channel polarity is active low or falling edge                    */
83 } TM_CHP_Enum;
84 /**
85  * @brief Enumeration of MCTM channel output idle state.
86  */
87 typedef enum
88 {
89   MCTM_OIS_LOW = 0,               /*!< MCTM channel output low when CHMOE equal to 0                        */
90   MCTM_OIS_HIGH                   /*!< MCTM channel output high when CHMOE equal to 0                       */
91 } MCTM_OIS_Enum;
92 /**
93  * @brief Enumeration of MCTM COMUS.
94  */
95 typedef enum
96 {
97   MCTM_COMUS_STIOFF = 0,            /*!< MCTM capture/compare control bits are updated by
98                                          setting the UEV2G bit only */
99   MCTM_COMUS_STION                  /*!< MCTM capture/compare control bits are updated by both
100                                          setting the UEV2G bit or when a rising edge occurs on STI */
101 } MCTM_COMUS_Enum;
102 #if (LIBCFG_MCTM_UEV1DIS)
103 /**
104  * @brief Enumeration of MCTM update event1 disasble.
105  */
106 typedef enum
107 {
108   MCTM_UEV1UD = 0x00000004,                 /*!< MCTM update event 1 rquest by overflow disable control     */
109   MCTM_UEV1OD = 0x00000008,                 /*!< MCTM update event 1 rquest by underflow disable control    */
110 } MCTM_UEV1DIS_Enum;
111 #endif
112 /**
113   * @}
114   */
115 
116 
117 /**
118   * @}
119   */
120 
121 /**
122   * @}
123   */
124 
125 #ifdef __cplusplus
126 }
127 #endif
128 
129 #endif
130