1 /**************************************************************************//**
2  * @file     hsotg_reg.h
3  * @version  V1.00
4  * @brief    HSOTG register definition header file
5  *
6  * SPDX-License-Identifier: Apache-2.0
7  * @copyright (C) 2017-2020 Nuvoton Technology Corp. All rights reserved.
8  *****************************************************************************/
9 #ifndef __HSOTG_REG_H__
10 #define __HSOTG_REG_H__
11 
12 #if defined ( __CC_ARM   )
13 #pragma anon_unions
14 #endif
15 
16 /**
17    @addtogroup REGISTER Control Register
18    @{
19 */
20 
21 /**
22     @addtogroup HSOTG High Speed USB On-The-Go Controller(HSOTG)
23     Memory Mapped Structure for HSOTG Controller
24 @{ */
25 
26 typedef struct
27 {
28 
29 
30     /**
31      * @var HSOTG_T::CTL
32      * Offset: 0x00  HSOTG Control Register
33      * ---------------------------------------------------------------------------------------------------
34      * |Bits    |Field     |Descriptions
35      * | :----: | :----:   | :---- |
36      * |[0]     |VBUSDROP  |Drop VBUS Control
37      * |        |          |If user application running on this OTG A-device wants to conserve power, set this bit to drop VBUS
38      * |        |          |BUSREQ (OTG_CTL[1]) will be also cleared no matter A-device or B-device.
39      * |        |          |0 = Not drop the VBUS.
40      * |        |          |1 = Drop the VBUS.
41      * |[1]     |BUSREQ    |OTG Bus Request
42      * |        |          |If OTG A-device wants to do data transfers via USB bus, setting this bit will drive VBUS high to detect USB device connection
43      * |        |          |If user won't use the bus any more, clearing this bit will drop VBUS to save power
44      * |        |          |This bit will be cleared when A-device goes to A_wait_vfall state
45      * |        |          |This bit will be also cleared if VBUSDROP (OTG_CTL[0]) bit is set or IDSTS (OTG_STATUS[1]) changed.
46      * |        |          |If user of an OTG-B Device wants to request VBUS, setting this bit will run SRP protocol
47      * |        |          |This bit will be cleared if SRP failure (OTG A-device does not provide VBUS after B-device issues ARP in specified interval, defined in OTG specification)
48      * |        |          |This bit will be also cleared if VBUSDROP (OTG_CTL[0]) bit is set IDSTS (OTG_STATUS[1]) changed.
49      * |        |          |0 = Not launch VBUS in OTG A-device or not request SRP in OTG B-device.
50      * |        |          |1 = Launch VBUS in OTG A-device or request SRP in OTG B-device.
51      * |[2]     |HNPREQEN  |OTG HNP Request Enable Bit
52      * |        |          |When USB frame as A-device, set this bit when A-device allows to process HNP protocol -- A-device changes role from Host to Peripheral
53      * |        |          |This bit will be cleared when OTG state changes from a_suspend to a_peripheral or goes back to a_idle state
54      * |        |          |When USB frame as B-device, set this bit after the OTG A-device successfully sends a SetFeature (b_hnp_enable) command to the OTG B-device to start role change -- B-device changes role from Peripheral to Host
55      * |        |          |This bit will be cleared when OTG state changes from b_peripheral to b_wait_acon or goes back to b_idle state.
56      * |        |          |0 = HNP request Disabled.
57      * |        |          |1 = HNP request Enabled (A-device can change role from Host to Peripheral or B-device can change role from Peripheral to Host).
58      * |        |          |Note: Refer to OTG specification to get a_suspend, a_peripheral, a_idle and b_idle state.
59      * |[4]     |OTGEN     |OTG Function Enable Bit
60      * |        |          |User needs to set this bit to enable OTG function while USB frame configured as OTG device
61      * |        |          |When USB frame not configured as OTG device, this bit is must be low.
62      * |        |          |0= OTG function Disabled.
63      * |        |          |1 = OTG function Enabled.
64      * |[5]     |WKEN      |OTG ID Pin Wake-up Enable Bit
65      * |        |          |0 = OTG ID pin status change wake-up function Disabled.
66      * |        |          |1 = OTG ID pin status change wake-up function Enabled.
67      * @var HSOTG_T::PHYCTL
68      * Offset: 0x04  HSOTG PHY Control Register
69      * ---------------------------------------------------------------------------------------------------
70      * |Bits    |Field     |Descriptions
71      * | :----: | :----:   | :---- |
72      * |[0]     |OTGPHYEN  |OTG PHY Enable
73      * |        |          |When USB frame is configured as OTG-device or ID-dependent, user needs to set this bit before using OTG function
74      * |        |          |If device is not configured as OTG-device nor ID-dependent, this bit is "don't care".
75      * |        |          |0 = OTG PHY Disabled.
76      * |        |          |1 = OTG PHY Enabled.
77      * |[1]     |IDDETEN   |ID Detection Enable Bit
78      * |        |          |0 = Detect ID pin status Disabled.
79      * |        |          |1 = Detect ID pin status Enabled.
80      * |[4]     |VBENPOL   |Off-chip USB VBUS Power Switch Enable Polarity
81      * |        |          |The OTG controller will enable off-chip USB VBUS power switch to provide VBUS power when need
82      * |        |          |A USB_VBUS_EN pin is used to control the off-chip USB VBUS power switch.
83      * |        |          |The polarity of enabling off-chip USB VBUS power switch (high active or low active) depends on the selected component
84      * |        |          |Set this bit as following according to the polarity of off-chip USB VBUS power switch.
85      * |        |          |0 = The off-chip USB VBUS power switch enable is active high.
86      * |        |          |1 = The off-chip USB VBUS power switch enable is active low.
87      * |[5]     |VBSTSPOL  |Off-chip USB VBUS Power Switch Status Polarity
88      * |        |          |The polarity of off-chip USB VBUS power switch valid signal depends on the selected component
89      * |        |          |A USB_VBUS_ST pin is used to monitor the valid signal of the off-chip USB VBUS power switch
90      * |        |          |Set this bit as following according to the polarity of off-chip USB VBUS power switch.
91      * |        |          |0 = The polarity of off-chip USB VBUS power switch valid status is high.
92      * |        |          |1 = The polarity of off-chip USB VBUS power switch valid status is low.
93      * @var HSOTG_T::INTEN
94      * Offset: 0x08  HSOTG Interrupt Enable Register
95      * ---------------------------------------------------------------------------------------------------
96      * |Bits    |Field     |Descriptions
97      * | :----: | :----:   | :---- |
98      * |[0]     |ROLECHGIEN|Role (Host or Peripheral) Changed Interrupt Enable Bit
99      * |        |          |0 = Interrupt Disabled.
100      * |        |          |1 = Interrupt Enabled.
101      * |[1]     |VBEIEN    |VBUS Error Interrupt Enable Bit
102      * |        |          |0 = Interrupt Disabled.
103      * |        |          |1 = Interrupt Enabled.
104      * |        |          |Note: VBUS error means going to a_vbus_err state. Please refer to A-device state diagram in OTG spec.
105      * |[2]     |SRPFIEN   |SRP Fail Interrupt Enable Bit
106      * |        |          |0 = Interrupt Disabled.
107      * |        |          |1 = Interrupt Enabled.
108      * |[3]     |HNPFIEN   |HNP Fail Interrupt Enable Bit
109      * |        |          |0 = Interrupt Disabled.
110      * |        |          |1 = Interrupt Enabled.
111      * |[4]     |GOIDLEIEN |OTG Device Goes to IDLE State Interrupt Enable Bit
112      * |        |          |0 = Interrupt Disabled.
113      * |        |          |1 = Interrupt Enabled.
114      * |        |          |Note: Going to idle state means going to a_idle or b_idle state
115      * |        |          |Please refer to A-device state diagram and B-device state diagram in OTG spec.
116      * |[5]     |IDCHGIEN  |IDSTS Changed Interrupt Enable Bit
117      * |        |          |If this bit is set to 1 and IDSTS (OTG_STATUS[1]) status is changed from high to low or from low to high, a interrupt will be asserted.
118      * |        |          |0 = Interrupt Disabled.
119      * |        |          |1 = Interrupt Enabled.
120      * |[6]     |PDEVIEN   |Act As Peripheral Interrupt Enable Bit
121      * |        |          |If this bit is set to 1 and the device is changed as a peripheral, a interrupt will be asserted.
122      * |        |          |0 = This device as a peripheral interrupt Disabled.
123      * |        |          |1 = This device as a peripheral interrupt Enabled.
124      * |[7]     |HOSTIEN   |Act As Host Interrupt Enable Bit
125      * |        |          |If this bit is set to 1 and the device is changed as a host, a interrupt will be asserted.
126      * |        |          |0 = This device as a host interrupt Disabled.
127      * |        |          |1 = This device as a host interrupt Enabled.
128      * |[8]     |BVLDCHGIEN|B-device Session Valid Status Changed Interrupt Enable Bit
129      * |        |          |If this bit is set to 1 and BVLD (OTG_STATUS[3]) status is changed from high to low or from low to high, a interrupt will be asserted.
130      * |        |          |0 = Interrupt Disabled.
131      * |        |          |1 = Interrupt Enabled.
132      * |[9]     |AVLDCHGIEN|A-device Session Valid Status Changed Interrupt Enable Bit
133      * |        |          |If this bit is set to 1 and AVLD (OTG_STATUS[4]) status is changed from high to low or from low to high, a interrupt will be asserted.
134      * |        |          |0 = Interrupt Disabled.
135      * |        |          |1 = Interrupt Enabled.
136      * |[10]    |VBCHGIEN  |VBUSVLD Status Changed Interrupt Enable Bit
137      * |        |          |If this bit is set to 1 and VBUSVLD (OTG_STATUS[5]) status is changed from high to low or from low to high, a interrupt will be asserted.
138      * |        |          |0 = Interrupt Disabled.
139      * |        |          |1 = Interrupt Enabled.
140      * |[11]    |SECHGIEN  |SESSEND Status Changed Interrupt Enable Bit
141      * |        |          |If this bit is set to 1 and SESSEND (OTG_STATUS[2]) status is changed from high to low or from low to high, a interrupt will be asserted.
142      * |        |          |0 = Interrupt Disabled.
143      * |        |          |1 = Interrupt Enabled.
144      * |[13]    |SRPDETIEN |SRP Detected Interrupt Enable Bit
145      * |        |          |0 = Interrupt Disabled.
146      * |        |          |1 = Interrupt Enabled.
147      * @var HSOTG_T::INTSTS
148      * Offset: 0x0C  HSOTG Interrupt Status Register
149      * ---------------------------------------------------------------------------------------------------
150      * |Bits    |Field     |Descriptions
151      * | :----: | :----:   | :---- |
152      * |[0]     |ROLECHGIF |OTG Role Change Interrupt Status
153      * |        |          |This flag is set when the role of an OTG device changed from a host to a peripheral, or changed from a peripheral to a host while USB_ID pin status does not change.
154      * |        |          |0 = OTG device role not changed.
155      * |        |          |1 = OTG device role changed.
156      * |        |          |Note: Write 1 to clear this flag.
157      * |[1]     |VBEIF     |VBUS Error Interrupt Status
158      * |        |          |This bit will be set when voltage on VBUS cannot reach a minimum valid threshold 4.4V within a maximum time of 100ms after OTG A-device starting to drive VBUS high.
159      * |        |          |0 = OTG A-device drives VBUS over threshold voltage before this interval expires.
160      * |        |          |1 = OTG A-device cannot drive VBUS over threshold voltage before this interval expires.
161      * |        |          |Note: Write 1 to clear this flag and recover from the VBUS error state.
162      * |[2]     |SRPFIF    |SRP Fail Interrupt Status
163      * |        |          |After initiating SRP, an OTG B-device will wait for the OTG A-device to drive VBUS high at least TB_SRP_FAIL minimum, defined in OTG specification
164      * |        |          |This flag is set when the OTG B-device does not get VBUS high after this interval.
165      * |        |          |0 = OTG B-device gets VBUS high before this interval.
166      * |        |          |1 = OTG B-device does not get VBUS high before this interval.
167      * |        |          |Note: Write 1 to clear this flag.
168      * |[3]     |HNPFIF    |HNP Fail Interrupt Status
169      * |        |          |When A-device has granted B-device to be host and USB bus is in SE0 (both USB_D+ and USB_D- low) state, this bit will be set when A-device does not connect after specified interval expires.
170      * |        |          |0 = A-device connects to B-device before specified interval expires.
171      * |        |          |1 = A-device does not connect to B-device before specified interval expires.
172      * |        |          |Note: Write 1 to clear this flag.
173      * |[4]     |GOIDLEIF  |OTG Device Goes to IDLE Interrupt Status
174      * |        |          |Flag is set if the OTG device transfers from non-idle state to idle state
175      * |        |          |The OTG device will be neither a host nor a peripheral.
176      * |        |          |0 = OTG device does not go back to idle state (a_idle or b_idle).
177      * |        |          |1 = OTG device goes back to idle state(a_idle or b_idle).
178      * |        |          |Note 1: Going to idle state means going to a_idle or b_idle state. Please refer to OTG specification.
179      * |        |          |Note 2: Write 1 to clear this flag.
180      * |[5]     |IDCHGIF   |ID State Change Interrupt Status
181      * |        |          |0 = IDSTS (OTG_STATUS[1]) not toggled.
182      * |        |          |1 = IDSTS (OTG_STATUS[1]) from high to low or from low to high.
183      * |        |          |Note: Write 1 to clear this flag.
184      * |[6]     |PDEVIF    |Act As Peripheral Interrupt Status
185      * |        |          |0= This device does not act as a peripheral.
186      * |        |          |1 = This device acts as a peripheral.
187      * |        |          |Note: Write 1 to clear this flag.
188      * |[7]     |HOSTIF    |Act As Host Interrupt Status
189      * |        |          |0= This device does not act as a host.
190      * |        |          |1 = This device acts as a host.
191      * |        |          |Note: Write 1 to clear this flag.
192      * |[8]     |BVLDCHGIF |B-device Session Valid State Change Interrupt Status
193      * |        |          |0 = BVLD (OTG_STATUS[3]) is not toggled.
194      * |        |          |1 = BVLD (OTG_STATUS[3]) from high to low or low to high.
195      * |        |          |Note: Write 1 to clear this status.
196      * |[9]     |AVLDCHGIF |A-device Session Valid State Change Interrupt Status
197      * |        |          |0 = AVLD (OTG_STATUS[4]) not toggled.
198      * |        |          |1 = AVLD (OTG_STATUS[4]) from high to low or low to high.
199      * |        |          |Note: Write 1 to clear this status.
200      * |[10]    |VBCHGIF   |VBUSVLD State Change Interrupt Status
201      * |        |          |0 = VBUSVLD (OTG_STATUS[5]) not toggled.
202      * |        |          |1 = VBUSVLD (OTG_STATUS[5]) from high to low or from low to high.
203      * |        |          |Note: Write 1 to clear this status.
204      * |[11]    |SECHGIF   |SESSEND State Change Interrupt Status
205      * |        |          |0 = SESSEND (OTG_STATUS[2]) not toggled.
206      * |        |          |1 = SESSEND (OTG_STATUS[2]) from high to low or from low to high.
207      * |        |          |Note: Write 1 to clear this flag.
208      * |[13]    |SRPDETIF  |SRP Detected Interrupt Status
209      * |        |          |0 = SRP not detected.
210      * |        |          |1 = SRP detected.
211      * |        |          |Note: Write 1 to clear this status.
212      * @var HSOTG_T::STATUS
213      * Offset: 0x10  HSOTG Status Register
214      * ---------------------------------------------------------------------------------------------------
215      * |Bits    |Field     |Descriptions
216      * | :----: | :----:   | :---- |
217      * |[0]     |OVERCUR   |over Current Condition
218      * |        |          |The voltage on VBUS cannot reach a minimum VBUS valid threshold, 4.4V minimum, within a maximum time of 100ms after OTG A-device drives VBUS high.
219      * |        |          |0 = OTG A-device drives VBUS successfully.
220      * |        |          |1 = OTG A-device cannot drives VBUS high in this interval.
221      * |[1]     |IDSTS     |USB_ID Pin State of Mini-b/Micro-plug
222      * |        |          |0 = Mini-A/Micro-A plug is attached.
223      * |        |          |1 = Mini-B/Micro-B plug is attached.
224      * |[2]     |SESSEND   |Session End Status
225      * |        |          |When VBUS voltage is lower than 0.4V, this bit will be set to 1
226      * |        |          |Session end means no meaningful power on VBUS.
227      * |        |          |0 = Session is not end.
228      * |        |          |1 = Session is end.
229      * |[3]     |BVLD      |B-device Session Valid Status
230      * |        |          |0 = B-device session is not valid.
231      * |        |          |1 = B-device session is valid.
232      * |[4]     |AVLD      |A-device Session Valid Status
233      * |        |          |0 = A-device session is not valid.
234      * |        |          |1 = A-device session is valid.
235      * |[5]     |VBUSVLD   |VBUS Valid Status
236      * |        |          |When VBUS is larger than 4.7V and A-device drives VBUS , this bit will be set to 1.
237      * |        |          |0 = VBUS is not valid.
238      * |        |          |1 = VBUS is valid.
239      * |[6]     |ASPERI    |As Peripheral Status
240      * |        |          |When OTG as peripheral, this bit is set.
241      * |        |          |0: OTG not as peripheral
242      * |        |          |1: OTG as peripheral
243      * |[7]     |ASHOST    |As Host Status
244      * |        |          |When OTG as Host, this bit is set.
245      * |        |          |0: OTG not as Host
246      * |        |          |1: OTG as Host
247      */
248     __IO uint32_t CTL;                   /*!< [0x0000] HSOTG Control Register                                           */
249     __IO uint32_t PHYCTL;                /*!< [0x0004] HSOTG PHY Control Register                                       */
250     __IO uint32_t INTEN;                 /*!< [0x0008] HSOTG Interrupt Enable Register                                  */
251     __IO uint32_t INTSTS;                /*!< [0x000c] HSOTG Interrupt Status Register                                  */
252     __I  uint32_t STATUS;                /*!< [0x0010] HSOTG Status Register                                            */
253 
254 } HSOTG_T;
255 
256 /**
257     @addtogroup HSOTG_CONST HSOTG Bit Field Definition
258     Constant Definitions for HSOTG Controller
259 @{ */
260 
261 #define HSOTG_CTL_VBUSDROP_Pos           (0)                                               /*!< HSOTG_T::CTL: VBUSDROP Position        */
262 #define HSOTG_CTL_VBUSDROP_Msk           (0x1ul << HSOTG_CTL_VBUSDROP_Pos)                 /*!< HSOTG_T::CTL: VBUSDROP Mask            */
263 
264 #define HSOTG_CTL_BUSREQ_Pos             (1)                                               /*!< HSOTG_T::CTL: BUSREQ Position          */
265 #define HSOTG_CTL_BUSREQ_Msk             (0x1ul << HSOTG_CTL_BUSREQ_Pos)                   /*!< HSOTG_T::CTL: BUSREQ Mask              */
266 
267 #define HSOTG_CTL_HNPREQEN_Pos           (2)                                               /*!< HSOTG_T::CTL: HNPREQEN Position        */
268 #define HSOTG_CTL_HNPREQEN_Msk           (0x1ul << HSOTG_CTL_HNPREQEN_Pos)                 /*!< HSOTG_T::CTL: HNPREQEN Mask            */
269 
270 #define HSOTG_CTL_OTGEN_Pos              (4)                                               /*!< HSOTG_T::CTL: OTGEN Position           */
271 #define HSOTG_CTL_OTGEN_Msk              (0x1ul << HSOTG_CTL_OTGEN_Pos)                    /*!< HSOTG_T::CTL: OTGEN Mask               */
272 
273 #define HSOTG_CTL_WKEN_Pos               (5)                                               /*!< HSOTG_T::CTL: WKEN Position            */
274 #define HSOTG_CTL_WKEN_Msk               (0x1ul << HSOTG_CTL_WKEN_Pos)                     /*!< HSOTG_T::CTL: WKEN Mask                */
275 
276 #define HSOTG_PHYCTL_OTGPHYEN_Pos        (0)                                               /*!< HSOTG_T::PHYCTL: OTGPHYEN Position     */
277 #define HSOTG_PHYCTL_OTGPHYEN_Msk        (0x1ul << HSOTG_PHYCTL_OTGPHYEN_Pos)              /*!< HSOTG_T::PHYCTL: OTGPHYEN Mask         */
278 
279 #define HSOTG_PHYCTL_IDDETEN_Pos         (1)                                               /*!< HSOTG_T::PHYCTL: IDDETEN Position      */
280 #define HSOTG_PHYCTL_IDDETEN_Msk         (0x1ul << HSOTG_PHYCTL_IDDETEN_Pos)               /*!< HSOTG_T::PHYCTL: IDDETEN Mask          */
281 
282 #define HSOTG_PHYCTL_VBENPOL_Pos         (4)                                               /*!< HSOTG_T::PHYCTL: VBENPOL Position      */
283 #define HSOTG_PHYCTL_VBENPOL_Msk         (0x1ul << HSOTG_PHYCTL_VBENPOL_Pos)               /*!< HSOTG_T::PHYCTL: VBENPOL Mask          */
284 
285 #define HSOTG_PHYCTL_VBSTSPOL_Pos        (5)                                               /*!< HSOTG_T::PHYCTL: VBSTSPOL Position     */
286 #define HSOTG_PHYCTL_VBSTSPOL_Msk        (0x1ul << HSOTG_PHYCTL_VBSTSPOL_Pos)              /*!< HSOTG_T::PHYCTL: VBSTSPOL Mask         */
287 
288 #define HSOTG_INTEN_ROLECHGIEN_Pos       (0)                                               /*!< HSOTG_T::INTEN: ROLECHGIEN Position    */
289 #define HSOTG_INTEN_ROLECHGIEN_Msk       (0x1ul << HSOTG_INTEN_ROLECHGIEN_Pos)             /*!< HSOTG_T::INTEN: ROLECHGIEN Mask        */
290 
291 #define HSOTG_INTEN_VBEIEN_Pos           (1)                                               /*!< HSOTG_T::INTEN: VBEIEN Position        */
292 #define HSOTG_INTEN_VBEIEN_Msk           (0x1ul << HSOTG_INTEN_VBEIEN_Pos)                 /*!< HSOTG_T::INTEN: VBEIEN Mask            */
293 
294 #define HSOTG_INTEN_SRPFIEN_Pos          (2)                                               /*!< HSOTG_T::INTEN: SRPFIEN Position       */
295 #define HSOTG_INTEN_SRPFIEN_Msk          (0x1ul << HSOTG_INTEN_SRPFIEN_Pos)                /*!< HSOTG_T::INTEN: SRPFIEN Mask           */
296 
297 #define HSOTG_INTEN_HNPFIEN_Pos          (3)                                               /*!< HSOTG_T::INTEN: HNPFIEN Position       */
298 #define HSOTG_INTEN_HNPFIEN_Msk          (0x1ul << HSOTG_INTEN_HNPFIEN_Pos)                /*!< HSOTG_T::INTEN: HNPFIEN Mask           */
299 
300 #define HSOTG_INTEN_GOIDLEIEN_Pos        (4)                                               /*!< HSOTG_T::INTEN: GOIDLEIEN Position     */
301 #define HSOTG_INTEN_GOIDLEIEN_Msk        (0x1ul << HSOTG_INTEN_GOIDLEIEN_Pos)              /*!< HSOTG_T::INTEN: GOIDLEIEN Mask         */
302 
303 #define HSOTG_INTEN_IDCHGIEN_Pos         (5)                                               /*!< HSOTG_T::INTEN: IDCHGIEN Position      */
304 #define HSOTG_INTEN_IDCHGIEN_Msk         (0x1ul << HSOTG_INTEN_IDCHGIEN_Pos)               /*!< HSOTG_T::INTEN: IDCHGIEN Mask          */
305 
306 #define HSOTG_INTEN_PDEVIEN_Pos          (6)                                               /*!< HSOTG_T::INTEN: PDEVIEN Position       */
307 #define HSOTG_INTEN_PDEVIEN_Msk          (0x1ul << HSOTG_INTEN_PDEVIEN_Pos)                /*!< HSOTG_T::INTEN: PDEVIEN Mask           */
308 
309 #define HSOTG_INTEN_HOSTIEN_Pos          (7)                                               /*!< HSOTG_T::INTEN: HOSTIEN Position       */
310 #define HSOTG_INTEN_HOSTIEN_Msk          (0x1ul << HSOTG_INTEN_HOSTIEN_Pos)                /*!< HSOTG_T::INTEN: HOSTIEN Mask           */
311 
312 #define HSOTG_INTEN_BVLDCHGIEN_Pos       (8)                                               /*!< HSOTG_T::INTEN: BVLDCHGIEN Position    */
313 #define HSOTG_INTEN_BVLDCHGIEN_Msk       (0x1ul << HSOTG_INTEN_BVLDCHGIEN_Pos)             /*!< HSOTG_T::INTEN: BVLDCHGIEN Mask        */
314 
315 #define HSOTG_INTEN_AVLDCHGIEN_Pos       (9)                                               /*!< HSOTG_T::INTEN: AVLDCHGIEN Position    */
316 #define HSOTG_INTEN_AVLDCHGIEN_Msk       (0x1ul << HSOTG_INTEN_AVLDCHGIEN_Pos)             /*!< HSOTG_T::INTEN: AVLDCHGIEN Mask        */
317 
318 #define HSOTG_INTEN_VBCHGIEN_Pos         (10)                                              /*!< HSOTG_T::INTEN: VBCHGIEN Position      */
319 #define HSOTG_INTEN_VBCHGIEN_Msk         (0x1ul << HSOTG_INTEN_VBCHGIEN_Pos)               /*!< HSOTG_T::INTEN: VBCHGIEN Mask          */
320 
321 #define HSOTG_INTEN_SECHGIEN_Pos         (11)                                              /*!< HSOTG_T::INTEN: SECHGIEN Position      */
322 #define HSOTG_INTEN_SECHGIEN_Msk         (0x1ul << HSOTG_INTEN_SECHGIEN_Pos)               /*!< HSOTG_T::INTEN: SECHGIEN Mask          */
323 
324 #define HSOTG_INTEN_SRPDETIEN_Pos        (13)                                              /*!< HSOTG_T::INTEN: SRPDETIEN Position     */
325 #define HSOTG_INTEN_SRPDETIEN_Msk        (0x1ul << HSOTG_INTEN_SRPDETIEN_Pos)              /*!< HSOTG_T::INTEN: SRPDETIEN Mask         */
326 
327 #define HSOTG_INTSTS_ROLECHGIF_Pos       (0)                                               /*!< HSOTG_T::INTSTS: ROLECHGIF Position    */
328 #define HSOTG_INTSTS_ROLECHGIF_Msk       (0x1ul << HSOTG_INTSTS_ROLECHGIF_Pos)             /*!< HSOTG_T::INTSTS: ROLECHGIF Mask        */
329 
330 #define HSOTG_INTSTS_VBEIF_Pos           (1)                                               /*!< HSOTG_T::INTSTS: VBEIF Position        */
331 #define HSOTG_INTSTS_VBEIF_Msk           (0x1ul << HSOTG_INTSTS_VBEIF_Pos)                 /*!< HSOTG_T::INTSTS: VBEIF Mask            */
332 
333 #define HSOTG_INTSTS_SRPFIF_Pos          (2)                                               /*!< HSOTG_T::INTSTS: SRPFIF Position       */
334 #define HSOTG_INTSTS_SRPFIF_Msk          (0x1ul << HSOTG_INTSTS_SRPFIF_Pos)                /*!< HSOTG_T::INTSTS: SRPFIF Mask           */
335 
336 #define HSOTG_INTSTS_HNPFIF_Pos          (3)                                               /*!< HSOTG_T::INTSTS: HNPFIF Position       */
337 #define HSOTG_INTSTS_HNPFIF_Msk          (0x1ul << HSOTG_INTSTS_HNPFIF_Pos)                /*!< HSOTG_T::INTSTS: HNPFIF Mask           */
338 
339 #define HSOTG_INTSTS_GOIDLEIF_Pos        (4)                                               /*!< HSOTG_T::INTSTS: GOIDLEIF Position     */
340 #define HSOTG_INTSTS_GOIDLEIF_Msk        (0x1ul << HSOTG_INTSTS_GOIDLEIF_Pos)              /*!< HSOTG_T::INTSTS: GOIDLEIF Mask         */
341 
342 #define HSOTG_INTSTS_IDCHGIF_Pos         (5)                                               /*!< HSOTG_T::INTSTS: IDCHGIF Position      */
343 #define HSOTG_INTSTS_IDCHGIF_Msk         (0x1ul << HSOTG_INTSTS_IDCHGIF_Pos)               /*!< HSOTG_T::INTSTS: IDCHGIF Mask          */
344 
345 #define HSOTG_INTSTS_PDEVIF_Pos          (6)                                               /*!< HSOTG_T::INTSTS: PDEVIF Position       */
346 #define HSOTG_INTSTS_PDEVIF_Msk          (0x1ul << HSOTG_INTSTS_PDEVIF_Pos)                /*!< HSOTG_T::INTSTS: PDEVIF Mask           */
347 
348 #define HSOTG_INTSTS_HOSTIF_Pos          (7)                                               /*!< HSOTG_T::INTSTS: HOSTIF Position       */
349 #define HSOTG_INTSTS_HOSTIF_Msk          (0x1ul << HSOTG_INTSTS_HOSTIF_Pos)                /*!< HSOTG_T::INTSTS: HOSTIF Mask           */
350 
351 #define HSOTG_INTSTS_BVLDCHGIF_Pos       (8)                                               /*!< HSOTG_T::INTSTS: BVLDCHGIF Position    */
352 #define HSOTG_INTSTS_BVLDCHGIF_Msk       (0x1ul << HSOTG_INTSTS_BVLDCHGIF_Pos)             /*!< HSOTG_T::INTSTS: BVLDCHGIF Mask        */
353 
354 #define HSOTG_INTSTS_AVLDCHGIF_Pos       (9)                                               /*!< HSOTG_T::INTSTS: AVLDCHGIF Position    */
355 #define HSOTG_INTSTS_AVLDCHGIF_Msk       (0x1ul << HSOTG_INTSTS_AVLDCHGIF_Pos)             /*!< HSOTG_T::INTSTS: AVLDCHGIF Mask        */
356 
357 #define HSOTG_INTSTS_VBCHGIF_Pos         (10)                                              /*!< HSOTG_T::INTSTS: VBCHGIF Position      */
358 #define HSOTG_INTSTS_VBCHGIF_Msk         (0x1ul << HSOTG_INTSTS_VBCHGIF_Pos)               /*!< HSOTG_T::INTSTS: VBCHGIF Mask          */
359 
360 #define HSOTG_INTSTS_SECHGIF_Pos         (11)                                              /*!< HSOTG_T::INTSTS: SECHGIF Position      */
361 #define HSOTG_INTSTS_SECHGIF_Msk         (0x1ul << HSOTG_INTSTS_SECHGIF_Pos)               /*!< HSOTG_T::INTSTS: SECHGIF Mask          */
362 
363 #define HSOTG_INTSTS_SRPDETIF_Pos        (13)                                              /*!< HSOTG_T::INTSTS: SRPDETIF Position     */
364 #define HSOTG_INTSTS_SRPDETIF_Msk        (0x1ul << HSOTG_INTSTS_SRPDETIF_Pos)              /*!< HSOTG_T::INTSTS: SRPDETIF Mask         */
365 
366 #define HSOTG_STATUS_OVERCUR_Pos         (0)                                               /*!< HSOTG_T::STATUS: OVERCUR Position      */
367 #define HSOTG_STATUS_OVERCUR_Msk         (0x1ul << HSOTG_STATUS_OVERCUR_Pos)               /*!< HSOTG_T::STATUS: OVERCUR Mask          */
368 
369 #define HSOTG_STATUS_IDSTS_Pos           (1)                                               /*!< HSOTG_T::STATUS: IDSTS Position        */
370 #define HSOTG_STATUS_IDSTS_Msk           (0x1ul << HSOTG_STATUS_IDSTS_Pos)                 /*!< HSOTG_T::STATUS: IDSTS Mask            */
371 
372 #define HSOTG_STATUS_SESSEND_Pos         (2)                                               /*!< HSOTG_T::STATUS: SESSEND Position      */
373 #define HSOTG_STATUS_SESSEND_Msk         (0x1ul << HSOTG_STATUS_SESSEND_Pos)               /*!< HSOTG_T::STATUS: SESSEND Mask          */
374 
375 #define HSOTG_STATUS_BVLD_Pos            (3)                                               /*!< HSOTG_T::STATUS: BVLD Position         */
376 #define HSOTG_STATUS_BVLD_Msk            (0x1ul << HSOTG_STATUS_BVLD_Pos)                  /*!< HSOTG_T::STATUS: BVLD Mask             */
377 
378 #define HSOTG_STATUS_AVLD_Pos            (4)                                               /*!< HSOTG_T::STATUS: AVLD Position         */
379 #define HSOTG_STATUS_AVLD_Msk            (0x1ul << HSOTG_STATUS_AVLD_Pos)                  /*!< HSOTG_T::STATUS: AVLD Mask             */
380 
381 #define HSOTG_STATUS_VBUSVLD_Pos         (5)                                               /*!< HSOTG_T::STATUS: VBUSVLD Position      */
382 #define HSOTG_STATUS_VBUSVLD_Msk         (0x1ul << HSOTG_STATUS_VBUSVLD_Pos)               /*!< HSOTG_T::STATUS: VBUSVLD Mask          */
383 
384 #define HSOTG_STATUS_ASPERI_Pos          (6)                                               /*!< HSOTG_T::STATUS: ASPERI Position       */
385 #define HSOTG_STATUS_ASPERI_Msk          (0x1ul << HSOTG_STATUS_ASPERI_Pos)                /*!< HSOTG_T::STATUS: ASPERI Mask           */
386 
387 #define HSOTG_STATUS_ASHOST_Pos          (7)                                               /*!< HSOTG_T::STATUS: ASHOST Position       */
388 #define HSOTG_STATUS_ASHOST_Msk          (0x1ul << HSOTG_STATUS_ASHOST_Pos)                /*!< HSOTG_T::STATUS: ASHOST Mask           */
389 
390 /**@}*/ /* HSOTG_CONST */
391 /**@}*/ /* end of HSOTG register group */
392 /**@}*/ /* end of REGISTER group */
393 
394 #if defined ( __CC_ARM   )
395 #pragma no_anon_unions
396 #endif
397 
398 #endif /* __HSOTG_REG_H__ */
399