![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Color Oled(SSD1331) connect to STMicroelectronics Nucleo-F466
mbed-os/targets/TARGET_NUVOTON/TARGET_M2351/device/Reg/otg_reg.h@3:f3764f852aa8, 2018-10-11 (annotated)
- Committer:
- kadonotakashi
- Date:
- Thu Oct 11 02:27:46 2018 +0000
- Revision:
- 3:f3764f852aa8
- Parent:
- 0:8fdf9a60065b
Nucreo 446 + SSD1331 test version;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kadonotakashi | 0:8fdf9a60065b | 1 | /**************************************************************************//** |
kadonotakashi | 0:8fdf9a60065b | 2 | * @file otg_reg.h |
kadonotakashi | 0:8fdf9a60065b | 3 | * @version V1.00 |
kadonotakashi | 0:8fdf9a60065b | 4 | * @brief OTG register definition header file |
kadonotakashi | 0:8fdf9a60065b | 5 | * |
kadonotakashi | 0:8fdf9a60065b | 6 | * @copyright (C) 2017 Nuvoton Technology Corp. All rights reserved. |
kadonotakashi | 0:8fdf9a60065b | 7 | *****************************************************************************/ |
kadonotakashi | 0:8fdf9a60065b | 8 | #ifndef __OTG_REG_H__ |
kadonotakashi | 0:8fdf9a60065b | 9 | #define __OTG_REG_H__ |
kadonotakashi | 0:8fdf9a60065b | 10 | |
kadonotakashi | 0:8fdf9a60065b | 11 | |
kadonotakashi | 0:8fdf9a60065b | 12 | |
kadonotakashi | 0:8fdf9a60065b | 13 | /*---------------------- USB On-The-Go Controller -------------------------*/ |
kadonotakashi | 0:8fdf9a60065b | 14 | /** |
kadonotakashi | 0:8fdf9a60065b | 15 | @addtogroup OTG USB On-The-Go Controller(OTG) |
kadonotakashi | 0:8fdf9a60065b | 16 | Memory Mapped Structure for OTG Controller |
kadonotakashi | 0:8fdf9a60065b | 17 | @{ */ |
kadonotakashi | 0:8fdf9a60065b | 18 | |
kadonotakashi | 0:8fdf9a60065b | 19 | typedef struct |
kadonotakashi | 0:8fdf9a60065b | 20 | { |
kadonotakashi | 0:8fdf9a60065b | 21 | |
kadonotakashi | 0:8fdf9a60065b | 22 | |
kadonotakashi | 0:8fdf9a60065b | 23 | /** |
kadonotakashi | 0:8fdf9a60065b | 24 | * @var OTG_T::CTL |
kadonotakashi | 0:8fdf9a60065b | 25 | * Offset: 0x00 OTG Control Register |
kadonotakashi | 0:8fdf9a60065b | 26 | * --------------------------------------------------------------------------------------------------- |
kadonotakashi | 0:8fdf9a60065b | 27 | * |Bits |Field |Descriptions |
kadonotakashi | 0:8fdf9a60065b | 28 | * | :----: | :----: | :---- | |
kadonotakashi | 0:8fdf9a60065b | 29 | * |[0] |VBUSDROP |Drop VBUS Control |
kadonotakashi | 0:8fdf9a60065b | 30 | * | | |If user application running on this OTG A-device wants to conserve power, set this bit to drop VBUS |
kadonotakashi | 0:8fdf9a60065b | 31 | * | | |BUSREQ (OTG_CTL[1]) will be also cleared no matter A-device or B-device. |
kadonotakashi | 0:8fdf9a60065b | 32 | * | | |0 = Not drop the VBUS. |
kadonotakashi | 0:8fdf9a60065b | 33 | * | | |1 = Drop the VBUS. |
kadonotakashi | 0:8fdf9a60065b | 34 | * |[1] |BUSREQ |OTG Bus Request |
kadonotakashi | 0:8fdf9a60065b | 35 | * | | |If OTG A-device wants to do data transfers via USB bus, setting this bit will drive VBUS high to detect USB device connection |
kadonotakashi | 0:8fdf9a60065b | 36 | * | | |If user won't use the bus any more, clearing this bit will drop VBUS to save power |
kadonotakashi | 0:8fdf9a60065b | 37 | * | | |This bit will be cleared when A-device goes to A_wait_vfall state |
kadonotakashi | 0:8fdf9a60065b | 38 | * | | |This bit will be also cleared if VBUSDROP (OTG_CTL[0]) bit is set or IDSTS (OTG_STATUS[1]) changed. |
kadonotakashi | 0:8fdf9a60065b | 39 | * | | |If user of an OTG-B Device wants to request VBUS, setting this bit will run SRP protocol |
kadonotakashi | 0:8fdf9a60065b | 40 | * | | |This bit will be cleared if SRP failure (OTG A-device does not provide VBUS after B-device issues SRP in specified interval, defined in OTG specification) |
kadonotakashi | 0:8fdf9a60065b | 41 | * | | |This bit will be also cleared if VBUSDROP (OTG_CTL[0]) bit is set or IDSTS (OTG_STATUS[1]) changed. |
kadonotakashi | 0:8fdf9a60065b | 42 | * | | |0 = Not launch VBUS in OTG A-device or not request SRP in OTG B-device. |
kadonotakashi | 0:8fdf9a60065b | 43 | * | | |1 = Launch VBUS in OTG A-device or request SRP in OTG B-device. |
kadonotakashi | 0:8fdf9a60065b | 44 | * |[2] |HNPREQEN |OTG HNP Request Enable Bit |
kadonotakashi | 0:8fdf9a60065b | 45 | * | | |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 |
kadonotakashi | 0:8fdf9a60065b | 46 | * | | |This bit will be cleared when OTG state changes from a_suspend to a_peripheral or goes back to a_idle state |
kadonotakashi | 0:8fdf9a60065b | 47 | * | | |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 |
kadonotakashi | 0:8fdf9a60065b | 48 | * | | |This bit will be cleared when OTG state changes from b_peripheral to b_wait_acon or goes back to b_idle state. |
kadonotakashi | 0:8fdf9a60065b | 49 | * | | |0 = HNP request Disabled. |
kadonotakashi | 0:8fdf9a60065b | 50 | * | | |1 = HNP request Enabled (A-device can change role from Host to Peripheral or B-device can change role from Peripheral to Host). |
kadonotakashi | 0:8fdf9a60065b | 51 | * | | |Note: Refer to OTG specification to get a_suspend, a_peripheral, a_idle and b_idle state. |
kadonotakashi | 0:8fdf9a60065b | 52 | * |[4] |OTGEN |OTG Function Enable Bit |
kadonotakashi | 0:8fdf9a60065b | 53 | * | | |User needs to set this bit to enable OTG function while USB frame configured as OTG device |
kadonotakashi | 0:8fdf9a60065b | 54 | * | | |When USB frame not configured as OTG device, this bit is must be low. |
kadonotakashi | 0:8fdf9a60065b | 55 | * | | |0= OTG function Disabled. |
kadonotakashi | 0:8fdf9a60065b | 56 | * | | |1 = OTG function Enabled. |
kadonotakashi | 0:8fdf9a60065b | 57 | * |[5] |WKEN |OTG ID Pin Wake-up Enable Bit |
kadonotakashi | 0:8fdf9a60065b | 58 | * | | |0 = OTG ID pin status change wake-up function Disabled. |
kadonotakashi | 0:8fdf9a60065b | 59 | * | | |1 = OTG ID pin status change wake-up function Enabled. |
kadonotakashi | 0:8fdf9a60065b | 60 | * @var OTG_T::PHYCTL |
kadonotakashi | 0:8fdf9a60065b | 61 | * Offset: 0x04 OTG PHY Control Register |
kadonotakashi | 0:8fdf9a60065b | 62 | * --------------------------------------------------------------------------------------------------- |
kadonotakashi | 0:8fdf9a60065b | 63 | * |Bits |Field |Descriptions |
kadonotakashi | 0:8fdf9a60065b | 64 | * | :----: | :----: | :---- | |
kadonotakashi | 0:8fdf9a60065b | 65 | * |[0] |OTGPHYEN |OTG PHY Enable Bit |
kadonotakashi | 0:8fdf9a60065b | 66 | * | | |When USB frame is configured as OTG-device or ID-dependent, user needs to set this bit before using OTG function |
kadonotakashi | 0:8fdf9a60065b | 67 | * | | |If device is not configured as OTG-device nor ID-dependent , this bit is "don't care". |
kadonotakashi | 0:8fdf9a60065b | 68 | * | | |0 = OTG PHY Disabled. |
kadonotakashi | 0:8fdf9a60065b | 69 | * | | |1 = OTG PHY Enabled. |
kadonotakashi | 0:8fdf9a60065b | 70 | * |[1] |IDDETEN |ID Detection Enable Bit |
kadonotakashi | 0:8fdf9a60065b | 71 | * | | |0 = Detect ID pin status Disabled. |
kadonotakashi | 0:8fdf9a60065b | 72 | * | | |1 = Detect ID pin status Enabled. |
kadonotakashi | 0:8fdf9a60065b | 73 | * |[4] |VBENPOL |Off-chip USB VBUS Power Switch Enable Polarity |
kadonotakashi | 0:8fdf9a60065b | 74 | * | | |The OTG controller will enable off-chip USB VBUS power switch to provide VBUS power when need |
kadonotakashi | 0:8fdf9a60065b | 75 | * | | |A USB_VBUS_EN pin is used to control the off-chip USB VBUS power switch. |
kadonotakashi | 0:8fdf9a60065b | 76 | * | | |The polarity of enabling off-chip USB VBUS power switch (high active or low active) depends on the selected component |
kadonotakashi | 0:8fdf9a60065b | 77 | * | | |Set this bit as following according to the polarity of off-chip USB VBUS power switch. |
kadonotakashi | 0:8fdf9a60065b | 78 | * | | |0 = The off-chip USB VBUS power switch enable is active high. |
kadonotakashi | 0:8fdf9a60065b | 79 | * | | |1 = The off-chip USB VBUS power switch enable is active low. |
kadonotakashi | 0:8fdf9a60065b | 80 | * |[5] |VBSTSPOL |Off-chip USB VBUS Power Switch Status Polarity |
kadonotakashi | 0:8fdf9a60065b | 81 | * | | |The polarity of off-chip USB VBUS power switch valid signal depends on the selected component |
kadonotakashi | 0:8fdf9a60065b | 82 | * | | |A USB_VBUS_ST pin is used to monitor the valid signal of the off-chip USB VBUS power switch |
kadonotakashi | 0:8fdf9a60065b | 83 | * | | |Set this bit as following according to the polarity of off-chip USB VBUS power switch. |
kadonotakashi | 0:8fdf9a60065b | 84 | * | | |0 = The polarity of off-chip USB VBUS power switch valid status is high. |
kadonotakashi | 0:8fdf9a60065b | 85 | * | | |1 = The polarity of off-chip USB VBUS power switch valid status is low. |
kadonotakashi | 0:8fdf9a60065b | 86 | * @var OTG_T::INTEN |
kadonotakashi | 0:8fdf9a60065b | 87 | * Offset: 0x08 OTG Interrupt Enable Register |
kadonotakashi | 0:8fdf9a60065b | 88 | * --------------------------------------------------------------------------------------------------- |
kadonotakashi | 0:8fdf9a60065b | 89 | * |Bits |Field |Descriptions |
kadonotakashi | 0:8fdf9a60065b | 90 | * | :----: | :----: | :---- | |
kadonotakashi | 0:8fdf9a60065b | 91 | * |[0] |ROLECHGIEN|Role (Host or Peripheral) Changed Interrupt Enable Bit |
kadonotakashi | 0:8fdf9a60065b | 92 | * | | |0 = Interrupt Disabled. |
kadonotakashi | 0:8fdf9a60065b | 93 | * | | |1 = Interrupt Enabled. |
kadonotakashi | 0:8fdf9a60065b | 94 | * |[1] |VBEIEN |VBUS Error Interrupt Enable Bit |
kadonotakashi | 0:8fdf9a60065b | 95 | * | | |0 = Interrupt Disabled. |
kadonotakashi | 0:8fdf9a60065b | 96 | * | | |1 = Interrupt Enabled. |
kadonotakashi | 0:8fdf9a60065b | 97 | * | | |Note: VBUS error means going to a_vbus_err state. Please refer to A-device state diagram in OTG specification. |
kadonotakashi | 0:8fdf9a60065b | 98 | * |[2] |SRPFIEN |SRP Fail Interrupt Enable Bit |
kadonotakashi | 0:8fdf9a60065b | 99 | * | | |0 = Interrupt Disabled. |
kadonotakashi | 0:8fdf9a60065b | 100 | * | | |1 = Interrupt Enabled. |
kadonotakashi | 0:8fdf9a60065b | 101 | * |[3] |HNPFIEN |HNP Fail Interrupt Enable Bit |
kadonotakashi | 0:8fdf9a60065b | 102 | * | | |0 = Interrupt Disabled. |
kadonotakashi | 0:8fdf9a60065b | 103 | * | | |1 = Interrupt Enabled. |
kadonotakashi | 0:8fdf9a60065b | 104 | * |[4] |GOIDLEIEN |OTG Device Goes to IDLE State Interrupt Enable Bit |
kadonotakashi | 0:8fdf9a60065b | 105 | * | | |0 = Interrupt Disabled. |
kadonotakashi | 0:8fdf9a60065b | 106 | * | | |1 = Interrupt Enabled. |
kadonotakashi | 0:8fdf9a60065b | 107 | * | | |Note: Going to idle state means going to a_idle or b_idle state |
kadonotakashi | 0:8fdf9a60065b | 108 | * | | |Please refer to A-device state diagram and B-device state diagram in OTG spec. |
kadonotakashi | 0:8fdf9a60065b | 109 | * |[5] |IDCHGIEN |IDSTS Changed Interrupt Enable Bit |
kadonotakashi | 0:8fdf9a60065b | 110 | * | | |If this bit is set to 1 and IDSTS (OTG_STATUS[1]) status is changed from high to low or from low to high, an interrupt will be asserted. |
kadonotakashi | 0:8fdf9a60065b | 111 | * | | |0 = Interrupt Disabled. |
kadonotakashi | 0:8fdf9a60065b | 112 | * | | |1 = Interrupt Enabled. |
kadonotakashi | 0:8fdf9a60065b | 113 | * |[6] |PDEVIEN |Act As Peripheral Interrupt Enable Bit |
kadonotakashi | 0:8fdf9a60065b | 114 | * | | |If this bit is set to 1 and the device is changed as a peripheral, an interrupt will be asserted. |
kadonotakashi | 0:8fdf9a60065b | 115 | * | | |0 = This device as a peripheral interrupt Disabled. |
kadonotakashi | 0:8fdf9a60065b | 116 | * | | |1 = This device as a peripheral interrupt Enabled. |
kadonotakashi | 0:8fdf9a60065b | 117 | * |[7] |HOSTIEN |Act As Host Interrupt Enable Bit |
kadonotakashi | 0:8fdf9a60065b | 118 | * | | |If this bit is set to 1 and the device is changed as a host, an interrupt will be asserted. |
kadonotakashi | 0:8fdf9a60065b | 119 | * | | |0 = This device as a host interrupt Disabled. |
kadonotakashi | 0:8fdf9a60065b | 120 | * | | |1 = This device as a host interrupt Enabled. |
kadonotakashi | 0:8fdf9a60065b | 121 | * |[8] |BVLDCHGIEN|B-device Session Valid Status Changed Interrupt Enable Bit |
kadonotakashi | 0:8fdf9a60065b | 122 | * | | |If this bit is set to 1 and BVLD (OTG_STATUS[3]) status is changed from high to low or from low to high, an interrupt will be asserted. |
kadonotakashi | 0:8fdf9a60065b | 123 | * | | |0 = Interrupt Disabled. |
kadonotakashi | 0:8fdf9a60065b | 124 | * | | |1 = Interrupt Enabled. |
kadonotakashi | 0:8fdf9a60065b | 125 | * |[9] |AVLDCHGIEN|A-device Session Valid Status Changed Interrupt Enable Bit |
kadonotakashi | 0:8fdf9a60065b | 126 | * | | |If this bit is set to 1 and AVLD (OTG_STATUS[4]) status is changed from high to low or from low to high, an interrupt will be asserted. |
kadonotakashi | 0:8fdf9a60065b | 127 | * | | |0 = Interrupt Disabled. |
kadonotakashi | 0:8fdf9a60065b | 128 | * | | |1 = Interrupt Enabled. |
kadonotakashi | 0:8fdf9a60065b | 129 | * |[10] |VBCHGIEN |VBUSVLD Status Changed Interrupt Enable Bit |
kadonotakashi | 0:8fdf9a60065b | 130 | * | | |If this bit is set to 1 and VBUSVLD (OTG_STATUS[5]) status is changed from high to low or from low to high, an interrupt will be asserted. |
kadonotakashi | 0:8fdf9a60065b | 131 | * | | |0 = Interrupt Disabled. |
kadonotakashi | 0:8fdf9a60065b | 132 | * | | |1 = Interrupt Enabled. |
kadonotakashi | 0:8fdf9a60065b | 133 | * |[11] |SECHGIEN |SESSEND Status Changed Interrupt Enable Bit |
kadonotakashi | 0:8fdf9a60065b | 134 | * | | |If this bit is set to 1 and SESSEND (OTG_STATUS[2]) status is changed from high to low or from low to high, an interrupt will be asserted. |
kadonotakashi | 0:8fdf9a60065b | 135 | * | | |0 = Interrupt Disabled. |
kadonotakashi | 0:8fdf9a60065b | 136 | * | | |1 = Interrupt Enabled. |
kadonotakashi | 0:8fdf9a60065b | 137 | * |[13] |SRPDETIEN |SRP Detected Interrupt Enable Bit |
kadonotakashi | 0:8fdf9a60065b | 138 | * | | |0 = Interrupt Disabled. |
kadonotakashi | 0:8fdf9a60065b | 139 | * | | |1 = Interrupt Enabled. |
kadonotakashi | 0:8fdf9a60065b | 140 | * @var OTG_T::INTSTS |
kadonotakashi | 0:8fdf9a60065b | 141 | * Offset: 0x0C OTG Interrupt Status Register |
kadonotakashi | 0:8fdf9a60065b | 142 | * --------------------------------------------------------------------------------------------------- |
kadonotakashi | 0:8fdf9a60065b | 143 | * |Bits |Field |Descriptions |
kadonotakashi | 0:8fdf9a60065b | 144 | * | :----: | :----: | :---- | |
kadonotakashi | 0:8fdf9a60065b | 145 | * |[0] |ROLECHGIF |OTG Role Change Interrupt Status |
kadonotakashi | 0:8fdf9a60065b | 146 | * | | |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. |
kadonotakashi | 0:8fdf9a60065b | 147 | * | | |0 = OTG device role not changed. |
kadonotakashi | 0:8fdf9a60065b | 148 | * | | |1 = OTG device role changed. |
kadonotakashi | 0:8fdf9a60065b | 149 | * | | |Note: Write 1 to clear this flag. |
kadonotakashi | 0:8fdf9a60065b | 150 | * |[1] |VBEIF |VBUS Error Interrupt Status |
kadonotakashi | 0:8fdf9a60065b | 151 | * | | |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. |
kadonotakashi | 0:8fdf9a60065b | 152 | * | | |0 = OTG A-device drives VBUS over threshold voltage before this interval expires. |
kadonotakashi | 0:8fdf9a60065b | 153 | * | | |1 = OTG A-device cannot drive VBUS over threshold voltage before this interval expires. |
kadonotakashi | 0:8fdf9a60065b | 154 | * | | |Note: Write 1 to clear this flag and recover from the VBUS error state. |
kadonotakashi | 0:8fdf9a60065b | 155 | * |[2] |SRPFIF |SRP Fail Interrupt Status |
kadonotakashi | 0:8fdf9a60065b | 156 | * | | |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 |
kadonotakashi | 0:8fdf9a60065b | 157 | * | | |This flag is set when the OTG B-device does not get VBUS high after this interval. |
kadonotakashi | 0:8fdf9a60065b | 158 | * | | |0 = OTG B-device gets VBUS high before this interval. |
kadonotakashi | 0:8fdf9a60065b | 159 | * | | |1 = OTG B-device does not get VBUS high before this interval. |
kadonotakashi | 0:8fdf9a60065b | 160 | * | | |Note: Write 1 to clear this flag. |
kadonotakashi | 0:8fdf9a60065b | 161 | * |[3] |HNPFIF |HNP Fail Interrupt Status |
kadonotakashi | 0:8fdf9a60065b | 162 | * | | |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. |
kadonotakashi | 0:8fdf9a60065b | 163 | * | | |0 = A-device connects to B-device before specified interval expires. |
kadonotakashi | 0:8fdf9a60065b | 164 | * | | |1 = A-device does not connect to B-device before specified interval expires. |
kadonotakashi | 0:8fdf9a60065b | 165 | * | | |Note: Write 1 to clear this flag. |
kadonotakashi | 0:8fdf9a60065b | 166 | * |[4] |GOIDLEIF |OTG Device Goes to IDLE Interrupt Status |
kadonotakashi | 0:8fdf9a60065b | 167 | * | | |Flag is set if the OTG device transfers from non-idle state to idle state |
kadonotakashi | 0:8fdf9a60065b | 168 | * | | |The OTG device will be neither a host nor a peripheral. |
kadonotakashi | 0:8fdf9a60065b | 169 | * | | |0 = OTG device does not go back to idle state (a_idle or b_idle). |
kadonotakashi | 0:8fdf9a60065b | 170 | * | | |1 = OTG device goes back to idle state(a_idle or b_idle). |
kadonotakashi | 0:8fdf9a60065b | 171 | * | | |Note 1: Going to idle state means going to a_idle or b_idle state. Please refer to OTG specification. |
kadonotakashi | 0:8fdf9a60065b | 172 | * | | |Note 2: Write 1 to clear this flag. |
kadonotakashi | 0:8fdf9a60065b | 173 | * |[5] |IDCHGIF |ID State Change Interrupt Status |
kadonotakashi | 0:8fdf9a60065b | 174 | * | | |0 = IDSTS (OTG_STATUS[1]) not toggled. |
kadonotakashi | 0:8fdf9a60065b | 175 | * | | |1 = IDSTS (OTG_STATUS[1]) from high to low or from low to high. |
kadonotakashi | 0:8fdf9a60065b | 176 | * | | |Note: Write 1 to clear this flag. |
kadonotakashi | 0:8fdf9a60065b | 177 | * |[6] |PDEVIF |Act As Peripheral Interrupt Status |
kadonotakashi | 0:8fdf9a60065b | 178 | * | | |0= This device does not act as a peripheral. |
kadonotakashi | 0:8fdf9a60065b | 179 | * | | |1 = This device acts as a peripheral. |
kadonotakashi | 0:8fdf9a60065b | 180 | * | | |Note: Write 1 to clear this flag. |
kadonotakashi | 0:8fdf9a60065b | 181 | * |[7] |HOSTIF |Act As Host Interrupt Status |
kadonotakashi | 0:8fdf9a60065b | 182 | * | | |0= This device does not act as a host. |
kadonotakashi | 0:8fdf9a60065b | 183 | * | | |1 = This device acts as a host. |
kadonotakashi | 0:8fdf9a60065b | 184 | * | | |Note: Write 1 to clear this flag. |
kadonotakashi | 0:8fdf9a60065b | 185 | * |[8] |BVLDCHGIF |B-device Session Valid State Change Interrupt Status |
kadonotakashi | 0:8fdf9a60065b | 186 | * | | |0 = BVLD (OTG_STATUS[3]) is not toggled. |
kadonotakashi | 0:8fdf9a60065b | 187 | * | | |1 = BVLD (OTG_STATUS[3]) from high to low or low to high. |
kadonotakashi | 0:8fdf9a60065b | 188 | * | | |Note: Write 1 to clear this status. |
kadonotakashi | 0:8fdf9a60065b | 189 | * |[9] |AVLDCHGIF |A-device Session Valid State Change Interrupt Status |
kadonotakashi | 0:8fdf9a60065b | 190 | * | | |0 = AVLD (OTG_STATUS[4]) not toggled. |
kadonotakashi | 0:8fdf9a60065b | 191 | * | | |1 = AVLD (OTG_STATUS[4]) from high to low or low to high. |
kadonotakashi | 0:8fdf9a60065b | 192 | * | | |Note: Write 1 to clear this status. |
kadonotakashi | 0:8fdf9a60065b | 193 | * |[10] |VBCHGIF |VBUSVLD State Change Interrupt Status |
kadonotakashi | 0:8fdf9a60065b | 194 | * | | |0 = VBUSVLD (OTG_STATUS[5]) not toggled. |
kadonotakashi | 0:8fdf9a60065b | 195 | * | | |1 = VBUSVLD (OTG_STATUS[5]) from high to low or from low to high. |
kadonotakashi | 0:8fdf9a60065b | 196 | * | | |Note: Write 1 to clear this status. |
kadonotakashi | 0:8fdf9a60065b | 197 | * |[11] |SECHGIF |SESSEND State Change Interrupt Status |
kadonotakashi | 0:8fdf9a60065b | 198 | * | | |0 = SESSEND (OTG_STATUS[2]) not toggled. |
kadonotakashi | 0:8fdf9a60065b | 199 | * | | |1 = SESSEND (OTG_STATUS[2]) from high to low or from low to high. |
kadonotakashi | 0:8fdf9a60065b | 200 | * | | |Note: Write 1 to clear this flag. |
kadonotakashi | 0:8fdf9a60065b | 201 | * |[13] |SRPDETIF |SRP Detected Interrupt Status |
kadonotakashi | 0:8fdf9a60065b | 202 | * | | |0 = SRP not detected. |
kadonotakashi | 0:8fdf9a60065b | 203 | * | | |1 = SRP detected. |
kadonotakashi | 0:8fdf9a60065b | 204 | * | | |Note: Write 1 to clear this status. |
kadonotakashi | 0:8fdf9a60065b | 205 | * @var OTG_T::STATUS |
kadonotakashi | 0:8fdf9a60065b | 206 | * Offset: 0x10 OTG Status Register |
kadonotakashi | 0:8fdf9a60065b | 207 | * --------------------------------------------------------------------------------------------------- |
kadonotakashi | 0:8fdf9a60065b | 208 | * |Bits |Field |Descriptions |
kadonotakashi | 0:8fdf9a60065b | 209 | * | :----: | :----: | :---- | |
kadonotakashi | 0:8fdf9a60065b | 210 | * |[0] |OVERCUR |Over Current Condition |
kadonotakashi | 0:8fdf9a60065b | 211 | * | | |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. |
kadonotakashi | 0:8fdf9a60065b | 212 | * | | |0 = OTG A-device drives VBUS successfully. |
kadonotakashi | 0:8fdf9a60065b | 213 | * | | |1 = OTG A-device cannot drives VBUS high in this interval. |
kadonotakashi | 0:8fdf9a60065b | 214 | * |[1] |IDSTS |USB_ID Pin State of Mini-/Micro- Plug |
kadonotakashi | 0:8fdf9a60065b | 215 | * | | |0 = Mini-A/Micro-A plug is attached. |
kadonotakashi | 0:8fdf9a60065b | 216 | * | | |1 = Mini-B/Micro-B plug is attached. |
kadonotakashi | 0:8fdf9a60065b | 217 | * |[2] |SESSEND |Session End Status |
kadonotakashi | 0:8fdf9a60065b | 218 | * | | |When VBUS voltage is lower than 0.4V, this bit will be set to 1 |
kadonotakashi | 0:8fdf9a60065b | 219 | * | | |Session end means no meaningful power on VBUS. |
kadonotakashi | 0:8fdf9a60065b | 220 | * | | |0 = Session is not end. |
kadonotakashi | 0:8fdf9a60065b | 221 | * | | |1 = Session is end. |
kadonotakashi | 0:8fdf9a60065b | 222 | * |[3] |BVLD |B-device Session Valid Status |
kadonotakashi | 0:8fdf9a60065b | 223 | * | | |0 = B-device session is not valid. |
kadonotakashi | 0:8fdf9a60065b | 224 | * | | |1 = B-device session is valid. |
kadonotakashi | 0:8fdf9a60065b | 225 | * |[4] |AVLD |A-device Session Valid Status |
kadonotakashi | 0:8fdf9a60065b | 226 | * | | |0 = A-device session is not valid. |
kadonotakashi | 0:8fdf9a60065b | 227 | * | | |1 = A-device session is valid. |
kadonotakashi | 0:8fdf9a60065b | 228 | * |[5] |VBUSVLD |VBUS Valid Status |
kadonotakashi | 0:8fdf9a60065b | 229 | * | | |When VBUS is larger than 4.7V, this bit will be set to 1. |
kadonotakashi | 0:8fdf9a60065b | 230 | * | | |0 = VBUS is not valid. |
kadonotakashi | 0:8fdf9a60065b | 231 | * | | |1 = VBUS is valid. |
kadonotakashi | 0:8fdf9a60065b | 232 | * |[6] |ASPERI |As Peripheral Status |
kadonotakashi | 0:8fdf9a60065b | 233 | * | | |When OTG as peripheral, this bit is set. |
kadonotakashi | 0:8fdf9a60065b | 234 | * | | |0: OTG not as peripheral |
kadonotakashi | 0:8fdf9a60065b | 235 | * | | |1: OTG as peripheral |
kadonotakashi | 0:8fdf9a60065b | 236 | * |[7] |ASHOST |As Host Status |
kadonotakashi | 0:8fdf9a60065b | 237 | * | | |When OTG as Host, this bit is set. |
kadonotakashi | 0:8fdf9a60065b | 238 | * | | |0: OTG not as Host |
kadonotakashi | 0:8fdf9a60065b | 239 | * | | |1: OTG as Host |
kadonotakashi | 0:8fdf9a60065b | 240 | */ |
kadonotakashi | 0:8fdf9a60065b | 241 | __IO uint32_t CTL; /*!< [0x0000] OTG Control Register */ |
kadonotakashi | 0:8fdf9a60065b | 242 | __IO uint32_t PHYCTL; /*!< [0x0004] OTG PHY Control Register */ |
kadonotakashi | 0:8fdf9a60065b | 243 | __IO uint32_t INTEN; /*!< [0x0008] OTG Interrupt Enable Register */ |
kadonotakashi | 0:8fdf9a60065b | 244 | __IO uint32_t INTSTS; /*!< [0x000c] OTG Interrupt Status Register */ |
kadonotakashi | 0:8fdf9a60065b | 245 | __I uint32_t STATUS; /*!< [0x0010] OTG Status Register */ |
kadonotakashi | 0:8fdf9a60065b | 246 | |
kadonotakashi | 0:8fdf9a60065b | 247 | } OTG_T; |
kadonotakashi | 0:8fdf9a60065b | 248 | |
kadonotakashi | 0:8fdf9a60065b | 249 | /** |
kadonotakashi | 0:8fdf9a60065b | 250 | @addtogroup OTG_CONST OTG Bit Field Definition |
kadonotakashi | 0:8fdf9a60065b | 251 | Constant Definitions for OTG Controller |
kadonotakashi | 0:8fdf9a60065b | 252 | @{ */ |
kadonotakashi | 0:8fdf9a60065b | 253 | |
kadonotakashi | 0:8fdf9a60065b | 254 | #define OTG_CTL_VBUSDROP_Pos (0) /*!< OTG_T::CTL: VBUSDROP Position */ |
kadonotakashi | 0:8fdf9a60065b | 255 | #define OTG_CTL_VBUSDROP_Msk (0x1ul << OTG_CTL_VBUSDROP_Pos) /*!< OTG_T::CTL: VBUSDROP Mask */ |
kadonotakashi | 0:8fdf9a60065b | 256 | |
kadonotakashi | 0:8fdf9a60065b | 257 | #define OTG_CTL_BUSREQ_Pos (1) /*!< OTG_T::CTL: BUSREQ Position */ |
kadonotakashi | 0:8fdf9a60065b | 258 | #define OTG_CTL_BUSREQ_Msk (0x1ul << OTG_CTL_BUSREQ_Pos) /*!< OTG_T::CTL: BUSREQ Mask */ |
kadonotakashi | 0:8fdf9a60065b | 259 | |
kadonotakashi | 0:8fdf9a60065b | 260 | #define OTG_CTL_HNPREQEN_Pos (2) /*!< OTG_T::CTL: HNPREQEN Position */ |
kadonotakashi | 0:8fdf9a60065b | 261 | #define OTG_CTL_HNPREQEN_Msk (0x1ul << OTG_CTL_HNPREQEN_Pos) /*!< OTG_T::CTL: HNPREQEN Mask */ |
kadonotakashi | 0:8fdf9a60065b | 262 | |
kadonotakashi | 0:8fdf9a60065b | 263 | #define OTG_CTL_OTGEN_Pos (4) /*!< OTG_T::CTL: OTGEN Position */ |
kadonotakashi | 0:8fdf9a60065b | 264 | #define OTG_CTL_OTGEN_Msk (0x1ul << OTG_CTL_OTGEN_Pos) /*!< OTG_T::CTL: OTGEN Mask */ |
kadonotakashi | 0:8fdf9a60065b | 265 | |
kadonotakashi | 0:8fdf9a60065b | 266 | #define OTG_CTL_WKEN_Pos (5) /*!< OTG_T::CTL: WKEN Position */ |
kadonotakashi | 0:8fdf9a60065b | 267 | #define OTG_CTL_WKEN_Msk (0x1ul << OTG_CTL_WKEN_Pos) /*!< OTG_T::CTL: WKEN Mask */ |
kadonotakashi | 0:8fdf9a60065b | 268 | |
kadonotakashi | 0:8fdf9a60065b | 269 | #define OTG_PHYCTL_OTGPHYEN_Pos (0) /*!< OTG_T::PHYCTL: OTGPHYEN Position */ |
kadonotakashi | 0:8fdf9a60065b | 270 | #define OTG_PHYCTL_OTGPHYEN_Msk (0x1ul << OTG_PHYCTL_OTGPHYEN_Pos) /*!< OTG_T::PHYCTL: OTGPHYEN Mask */ |
kadonotakashi | 0:8fdf9a60065b | 271 | |
kadonotakashi | 0:8fdf9a60065b | 272 | #define OTG_PHYCTL_IDDETEN_Pos (1) /*!< OTG_T::PHYCTL: IDDETEN Position */ |
kadonotakashi | 0:8fdf9a60065b | 273 | #define OTG_PHYCTL_IDDETEN_Msk (0x1ul << OTG_PHYCTL_IDDETEN_Pos) /*!< OTG_T::PHYCTL: IDDETEN Mask */ |
kadonotakashi | 0:8fdf9a60065b | 274 | |
kadonotakashi | 0:8fdf9a60065b | 275 | #define OTG_PHYCTL_VBENPOL_Pos (4) /*!< OTG_T::PHYCTL: VBENPOL Position */ |
kadonotakashi | 0:8fdf9a60065b | 276 | #define OTG_PHYCTL_VBENPOL_Msk (0x1ul << OTG_PHYCTL_VBENPOL_Pos) /*!< OTG_T::PHYCTL: VBENPOL Mask */ |
kadonotakashi | 0:8fdf9a60065b | 277 | |
kadonotakashi | 0:8fdf9a60065b | 278 | #define OTG_PHYCTL_VBSTSPOL_Pos (5) /*!< OTG_T::PHYCTL: VBSTSPOL Position */ |
kadonotakashi | 0:8fdf9a60065b | 279 | #define OTG_PHYCTL_VBSTSPOL_Msk (0x1ul << OTG_PHYCTL_VBSTSPOL_Pos) /*!< OTG_T::PHYCTL: VBSTSPOL Mask */ |
kadonotakashi | 0:8fdf9a60065b | 280 | |
kadonotakashi | 0:8fdf9a60065b | 281 | #define OTG_INTEN_ROLECHGIEN_Pos (0) /*!< OTG_T::INTEN: ROLECHGIEN Position */ |
kadonotakashi | 0:8fdf9a60065b | 282 | #define OTG_INTEN_ROLECHGIEN_Msk (0x1ul << OTG_INTEN_ROLECHGIEN_Pos) /*!< OTG_T::INTEN: ROLECHGIEN Mask */ |
kadonotakashi | 0:8fdf9a60065b | 283 | |
kadonotakashi | 0:8fdf9a60065b | 284 | #define OTG_INTEN_VBEIEN_Pos (1) /*!< OTG_T::INTEN: VBEIEN Position */ |
kadonotakashi | 0:8fdf9a60065b | 285 | #define OTG_INTEN_VBEIEN_Msk (0x1ul << OTG_INTEN_VBEIEN_Pos) /*!< OTG_T::INTEN: VBEIEN Mask */ |
kadonotakashi | 0:8fdf9a60065b | 286 | |
kadonotakashi | 0:8fdf9a60065b | 287 | #define OTG_INTEN_SRPFIEN_Pos (2) /*!< OTG_T::INTEN: SRPFIEN Position */ |
kadonotakashi | 0:8fdf9a60065b | 288 | #define OTG_INTEN_SRPFIEN_Msk (0x1ul << OTG_INTEN_SRPFIEN_Pos) /*!< OTG_T::INTEN: SRPFIEN Mask */ |
kadonotakashi | 0:8fdf9a60065b | 289 | |
kadonotakashi | 0:8fdf9a60065b | 290 | #define OTG_INTEN_HNPFIEN_Pos (3) /*!< OTG_T::INTEN: HNPFIEN Position */ |
kadonotakashi | 0:8fdf9a60065b | 291 | #define OTG_INTEN_HNPFIEN_Msk (0x1ul << OTG_INTEN_HNPFIEN_Pos) /*!< OTG_T::INTEN: HNPFIEN Mask */ |
kadonotakashi | 0:8fdf9a60065b | 292 | |
kadonotakashi | 0:8fdf9a60065b | 293 | #define OTG_INTEN_GOIDLEIEN_Pos (4) /*!< OTG_T::INTEN: GOIDLEIEN Position */ |
kadonotakashi | 0:8fdf9a60065b | 294 | #define OTG_INTEN_GOIDLEIEN_Msk (0x1ul << OTG_INTEN_GOIDLEIEN_Pos) /*!< OTG_T::INTEN: GOIDLEIEN Mask */ |
kadonotakashi | 0:8fdf9a60065b | 295 | |
kadonotakashi | 0:8fdf9a60065b | 296 | #define OTG_INTEN_IDCHGIEN_Pos (5) /*!< OTG_T::INTEN: IDCHGIEN Position */ |
kadonotakashi | 0:8fdf9a60065b | 297 | #define OTG_INTEN_IDCHGIEN_Msk (0x1ul << OTG_INTEN_IDCHGIEN_Pos) /*!< OTG_T::INTEN: IDCHGIEN Mask */ |
kadonotakashi | 0:8fdf9a60065b | 298 | |
kadonotakashi | 0:8fdf9a60065b | 299 | #define OTG_INTEN_PDEVIEN_Pos (6) /*!< OTG_T::INTEN: PDEVIEN Position */ |
kadonotakashi | 0:8fdf9a60065b | 300 | #define OTG_INTEN_PDEVIEN_Msk (0x1ul << OTG_INTEN_PDEVIEN_Pos) /*!< OTG_T::INTEN: PDEVIEN Mask */ |
kadonotakashi | 0:8fdf9a60065b | 301 | |
kadonotakashi | 0:8fdf9a60065b | 302 | #define OTG_INTEN_HOSTIEN_Pos (7) /*!< OTG_T::INTEN: HOSTIEN Position */ |
kadonotakashi | 0:8fdf9a60065b | 303 | #define OTG_INTEN_HOSTIEN_Msk (0x1ul << OTG_INTEN_HOSTIEN_Pos) /*!< OTG_T::INTEN: HOSTIEN Mask */ |
kadonotakashi | 0:8fdf9a60065b | 304 | |
kadonotakashi | 0:8fdf9a60065b | 305 | #define OTG_INTEN_BVLDCHGIEN_Pos (8) /*!< OTG_T::INTEN: BVLDCHGIEN Position */ |
kadonotakashi | 0:8fdf9a60065b | 306 | #define OTG_INTEN_BVLDCHGIEN_Msk (0x1ul << OTG_INTEN_BVLDCHGIEN_Pos) /*!< OTG_T::INTEN: BVLDCHGIEN Mask */ |
kadonotakashi | 0:8fdf9a60065b | 307 | |
kadonotakashi | 0:8fdf9a60065b | 308 | #define OTG_INTEN_AVLDCHGIEN_Pos (9) /*!< OTG_T::INTEN: AVLDCHGIEN Position */ |
kadonotakashi | 0:8fdf9a60065b | 309 | #define OTG_INTEN_AVLDCHGIEN_Msk (0x1ul << OTG_INTEN_AVLDCHGIEN_Pos) /*!< OTG_T::INTEN: AVLDCHGIEN Mask */ |
kadonotakashi | 0:8fdf9a60065b | 310 | |
kadonotakashi | 0:8fdf9a60065b | 311 | #define OTG_INTEN_VBCHGIEN_Pos (10) /*!< OTG_T::INTEN: VBCHGIEN Position */ |
kadonotakashi | 0:8fdf9a60065b | 312 | #define OTG_INTEN_VBCHGIEN_Msk (0x1ul << OTG_INTEN_VBCHGIEN_Pos) /*!< OTG_T::INTEN: VBCHGIEN Mask */ |
kadonotakashi | 0:8fdf9a60065b | 313 | |
kadonotakashi | 0:8fdf9a60065b | 314 | #define OTG_INTEN_SECHGIEN_Pos (11) /*!< OTG_T::INTEN: SECHGIEN Position */ |
kadonotakashi | 0:8fdf9a60065b | 315 | #define OTG_INTEN_SECHGIEN_Msk (0x1ul << OTG_INTEN_SECHGIEN_Pos) /*!< OTG_T::INTEN: SECHGIEN Mask */ |
kadonotakashi | 0:8fdf9a60065b | 316 | |
kadonotakashi | 0:8fdf9a60065b | 317 | #define OTG_INTEN_SRPDETIEN_Pos (13) /*!< OTG_T::INTEN: SRPDETIEN Position */ |
kadonotakashi | 0:8fdf9a60065b | 318 | #define OTG_INTEN_SRPDETIEN_Msk (0x1ul << OTG_INTEN_SRPDETIEN_Pos) /*!< OTG_T::INTEN: SRPDETIEN Mask */ |
kadonotakashi | 0:8fdf9a60065b | 319 | |
kadonotakashi | 0:8fdf9a60065b | 320 | #define OTG_INTSTS_ROLECHGIF_Pos (0) /*!< OTG_T::INTSTS: ROLECHGIF Position */ |
kadonotakashi | 0:8fdf9a60065b | 321 | #define OTG_INTSTS_ROLECHGIF_Msk (0x1ul << OTG_INTSTS_ROLECHGIF_Pos) /*!< OTG_T::INTSTS: ROLECHGIF Mask */ |
kadonotakashi | 0:8fdf9a60065b | 322 | |
kadonotakashi | 0:8fdf9a60065b | 323 | #define OTG_INTSTS_VBEIF_Pos (1) /*!< OTG_T::INTSTS: VBEIF Position */ |
kadonotakashi | 0:8fdf9a60065b | 324 | #define OTG_INTSTS_VBEIF_Msk (0x1ul << OTG_INTSTS_VBEIF_Pos) /*!< OTG_T::INTSTS: VBEIF Mask */ |
kadonotakashi | 0:8fdf9a60065b | 325 | |
kadonotakashi | 0:8fdf9a60065b | 326 | #define OTG_INTSTS_SRPFIF_Pos (2) /*!< OTG_T::INTSTS: SRPFIF Position */ |
kadonotakashi | 0:8fdf9a60065b | 327 | #define OTG_INTSTS_SRPFIF_Msk (0x1ul << OTG_INTSTS_SRPFIF_Pos) /*!< OTG_T::INTSTS: SRPFIF Mask */ |
kadonotakashi | 0:8fdf9a60065b | 328 | |
kadonotakashi | 0:8fdf9a60065b | 329 | #define OTG_INTSTS_HNPFIF_Pos (3) /*!< OTG_T::INTSTS: HNPFIF Position */ |
kadonotakashi | 0:8fdf9a60065b | 330 | #define OTG_INTSTS_HNPFIF_Msk (0x1ul << OTG_INTSTS_HNPFIF_Pos) /*!< OTG_T::INTSTS: HNPFIF Mask */ |
kadonotakashi | 0:8fdf9a60065b | 331 | |
kadonotakashi | 0:8fdf9a60065b | 332 | #define OTG_INTSTS_GOIDLEIF_Pos (4) /*!< OTG_T::INTSTS: GOIDLEIF Position */ |
kadonotakashi | 0:8fdf9a60065b | 333 | #define OTG_INTSTS_GOIDLEIF_Msk (0x1ul << OTG_INTSTS_GOIDLEIF_Pos) /*!< OTG_T::INTSTS: GOIDLEIF Mask */ |
kadonotakashi | 0:8fdf9a60065b | 334 | |
kadonotakashi | 0:8fdf9a60065b | 335 | #define OTG_INTSTS_IDCHGIF_Pos (5) /*!< OTG_T::INTSTS: IDCHGIF Position */ |
kadonotakashi | 0:8fdf9a60065b | 336 | #define OTG_INTSTS_IDCHGIF_Msk (0x1ul << OTG_INTSTS_IDCHGIF_Pos) /*!< OTG_T::INTSTS: IDCHGIF Mask */ |
kadonotakashi | 0:8fdf9a60065b | 337 | |
kadonotakashi | 0:8fdf9a60065b | 338 | #define OTG_INTSTS_PDEVIF_Pos (6) /*!< OTG_T::INTSTS: PDEVIF Position */ |
kadonotakashi | 0:8fdf9a60065b | 339 | #define OTG_INTSTS_PDEVIF_Msk (0x1ul << OTG_INTSTS_PDEVIF_Pos) /*!< OTG_T::INTSTS: PDEVIF Mask */ |
kadonotakashi | 0:8fdf9a60065b | 340 | |
kadonotakashi | 0:8fdf9a60065b | 341 | #define OTG_INTSTS_HOSTIF_Pos (7) /*!< OTG_T::INTSTS: HOSTIF Position */ |
kadonotakashi | 0:8fdf9a60065b | 342 | #define OTG_INTSTS_HOSTIF_Msk (0x1ul << OTG_INTSTS_HOSTIF_Pos) /*!< OTG_T::INTSTS: HOSTIF Mask */ |
kadonotakashi | 0:8fdf9a60065b | 343 | |
kadonotakashi | 0:8fdf9a60065b | 344 | #define OTG_INTSTS_BVLDCHGIF_Pos (8) /*!< OTG_T::INTSTS: BVLDCHGIF Position */ |
kadonotakashi | 0:8fdf9a60065b | 345 | #define OTG_INTSTS_BVLDCHGIF_Msk (0x1ul << OTG_INTSTS_BVLDCHGIF_Pos) /*!< OTG_T::INTSTS: BVLDCHGIF Mask */ |
kadonotakashi | 0:8fdf9a60065b | 346 | |
kadonotakashi | 0:8fdf9a60065b | 347 | #define OTG_INTSTS_AVLDCHGIF_Pos (9) /*!< OTG_T::INTSTS: AVLDCHGIF Position */ |
kadonotakashi | 0:8fdf9a60065b | 348 | #define OTG_INTSTS_AVLDCHGIF_Msk (0x1ul << OTG_INTSTS_AVLDCHGIF_Pos) /*!< OTG_T::INTSTS: AVLDCHGIF Mask */ |
kadonotakashi | 0:8fdf9a60065b | 349 | |
kadonotakashi | 0:8fdf9a60065b | 350 | #define OTG_INTSTS_VBCHGIF_Pos (10) /*!< OTG_T::INTSTS: VBCHGIF Position */ |
kadonotakashi | 0:8fdf9a60065b | 351 | #define OTG_INTSTS_VBCHGIF_Msk (0x1ul << OTG_INTSTS_VBCHGIF_Pos) /*!< OTG_T::INTSTS: VBCHGIF Mask */ |
kadonotakashi | 0:8fdf9a60065b | 352 | |
kadonotakashi | 0:8fdf9a60065b | 353 | #define OTG_INTSTS_SECHGIF_Pos (11) /*!< OTG_T::INTSTS: SECHGIF Position */ |
kadonotakashi | 0:8fdf9a60065b | 354 | #define OTG_INTSTS_SECHGIF_Msk (0x1ul << OTG_INTSTS_SECHGIF_Pos) /*!< OTG_T::INTSTS: SECHGIF Mask */ |
kadonotakashi | 0:8fdf9a60065b | 355 | |
kadonotakashi | 0:8fdf9a60065b | 356 | #define OTG_INTSTS_SRPDETIF_Pos (13) /*!< OTG_T::INTSTS: SRPDETIF Position */ |
kadonotakashi | 0:8fdf9a60065b | 357 | #define OTG_INTSTS_SRPDETIF_Msk (0x1ul << OTG_INTSTS_SRPDETIF_Pos) /*!< OTG_T::INTSTS: SRPDETIF Mask */ |
kadonotakashi | 0:8fdf9a60065b | 358 | |
kadonotakashi | 0:8fdf9a60065b | 359 | #define OTG_STATUS_OVERCUR_Pos (0) /*!< OTG_T::STATUS: OVERCUR Position */ |
kadonotakashi | 0:8fdf9a60065b | 360 | #define OTG_STATUS_OVERCUR_Msk (0x1ul << OTG_STATUS_OVERCUR_Pos) /*!< OTG_T::STATUS: OVERCUR Mask */ |
kadonotakashi | 0:8fdf9a60065b | 361 | |
kadonotakashi | 0:8fdf9a60065b | 362 | #define OTG_STATUS_IDSTS_Pos (1) /*!< OTG_T::STATUS: IDSTS Position */ |
kadonotakashi | 0:8fdf9a60065b | 363 | #define OTG_STATUS_IDSTS_Msk (0x1ul << OTG_STATUS_IDSTS_Pos) /*!< OTG_T::STATUS: IDSTS Mask */ |
kadonotakashi | 0:8fdf9a60065b | 364 | |
kadonotakashi | 0:8fdf9a60065b | 365 | #define OTG_STATUS_SESSEND_Pos (2) /*!< OTG_T::STATUS: SESSEND Position */ |
kadonotakashi | 0:8fdf9a60065b | 366 | #define OTG_STATUS_SESSEND_Msk (0x1ul << OTG_STATUS_SESSEND_Pos) /*!< OTG_T::STATUS: SESSEND Mask */ |
kadonotakashi | 0:8fdf9a60065b | 367 | |
kadonotakashi | 0:8fdf9a60065b | 368 | #define OTG_STATUS_BVLD_Pos (3) /*!< OTG_T::STATUS: BVLD Position */ |
kadonotakashi | 0:8fdf9a60065b | 369 | #define OTG_STATUS_BVLD_Msk (0x1ul << OTG_STATUS_BVLD_Pos) /*!< OTG_T::STATUS: BVLD Mask */ |
kadonotakashi | 0:8fdf9a60065b | 370 | |
kadonotakashi | 0:8fdf9a60065b | 371 | #define OTG_STATUS_AVLD_Pos (4) /*!< OTG_T::STATUS: AVLD Position */ |
kadonotakashi | 0:8fdf9a60065b | 372 | #define OTG_STATUS_AVLD_Msk (0x1ul << OTG_STATUS_AVLD_Pos) /*!< OTG_T::STATUS: AVLD Mask */ |
kadonotakashi | 0:8fdf9a60065b | 373 | |
kadonotakashi | 0:8fdf9a60065b | 374 | #define OTG_STATUS_VBUSVLD_Pos (5) /*!< OTG_T::STATUS: VBUSVLD Position */ |
kadonotakashi | 0:8fdf9a60065b | 375 | #define OTG_STATUS_VBUSVLD_Msk (0x1ul << OTG_STATUS_VBUSVLD_Pos) /*!< OTG_T::STATUS: VBUSVLD Mask */ |
kadonotakashi | 0:8fdf9a60065b | 376 | |
kadonotakashi | 0:8fdf9a60065b | 377 | #define OTG_STATUS_ASPERI_Pos (6) /*!< OTG_T::STATUS: ASPERI Position */ |
kadonotakashi | 0:8fdf9a60065b | 378 | #define OTG_STATUS_ASPERI_Msk (0x1ul << OTG_STATUS_ASPERI_Pos) /*!< OTG_T::STATUS: ASPERI Mask */ |
kadonotakashi | 0:8fdf9a60065b | 379 | |
kadonotakashi | 0:8fdf9a60065b | 380 | #define OTG_STATUS_ASHOST_Pos (7) /*!< OTG_T::STATUS: ASHOST Position */ |
kadonotakashi | 0:8fdf9a60065b | 381 | #define OTG_STATUS_ASHOST_Msk (0x1ul << OTG_STATUS_ASHOST_Pos) /*!< OTG_T::STATUS: ASHOST Mask */ |
kadonotakashi | 0:8fdf9a60065b | 382 | |
kadonotakashi | 0:8fdf9a60065b | 383 | /**@}*/ /* OTG_CONST */ |
kadonotakashi | 0:8fdf9a60065b | 384 | /**@}*/ /* end of OTG register group */ |
kadonotakashi | 0:8fdf9a60065b | 385 | |
kadonotakashi | 0:8fdf9a60065b | 386 | |
kadonotakashi | 0:8fdf9a60065b | 387 | |
kadonotakashi | 0:8fdf9a60065b | 388 | #endif /* __OTG_REG_H__ */ |