// Copyright 2020 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#pragma once
#include <stdint.h>
#include "soc/soc.h"
#ifdef __cplusplus
extern "C" {
#endif
/** Control/Status registers */
/** USB_GOTGCTL_REG register
* OTG Control and Status Register
*/
#define USB_GOTGCTL_REG (SOC_DPORT_USB_BASE + 0x0)
/** USB_SESREQSCS : RO; bitpos: [0]; default: 0;
* Session Request Success.The core sets this bit when a session request initiation is
* successful
*/
#define USB_SESREQSCS (BIT(0))
#define USB_SESREQSCS_M (USB_SESREQSCS_V << USB_SESREQSCS_S)
#define USB_SESREQSCS_V 0x00000001
#define USB_SESREQSCS_S 0
/** USB_SESREQ : R/W; bitpos: [1]; default: 0;
* Session Request.The application sets this bit to initiate a session request on the
* USB. The application can clear this bit by writing a 0 when the Host Negotiation
* Success Status Change bit in the OTG Interrupt register
* (GOTGINT_REG.USB_HSTNEGSUCSTSCHNG) is SET. The core clears this bit when the
* USB_HSTNEGSUCSTSCHNG bit is cleared
*/
#define USB_SESREQ (BIT(1))
#define USB_SESREQ_M (USB_SESREQ_V << USB_SESREQ_S)
#define USB_SESREQ_V 0x00000001
#define USB_SESREQ_S 1
/** USB_VBVALIDOVEN : R/W; bitpos: [2]; default: 0;
* VBUS Valid Override Enable
* 1'b1 : Internally Bvalid received from the PHY is overridden with
* GOTGCTL_REG.REG_VBVALIDOVVAl
* 1'b0 : Override is disabled and bvalid signal from the respective PHY selected is
* used internally by the controller
*/
#define USB_VBVALIDOVEN (BIT(2))
#define USB_VBVALIDOVEN_M (USB_VBVALIDOVEN_V << USB_VBVALIDOVEN_S)
#define USB_VBVALIDOVEN_V 0x00000001
#define USB_VBVALIDOVEN_S 2
/** USB_VBVALIDOVVAL : R/W; bitpos: [3]; default: 0;
* VBUS Valid OverrideValue
* 1'b0 : vbusvalid value is 1'b0 when GOTGCTL_REG.USB_VBVALIDOVEN =1
* 1'b1 : vbusvalid value is 1'b1 when GOTGCTL_REG.USB_VBVALIDOVEN =1
*/
#define USB_VBVALIDOVVAL (BIT(3))
#define USB_VBVALIDOVVAL_M (USB_VBVALIDOVVAL_V << USB_VBVALIDOVVAL_S)
#define USB_VBVALIDOVVAL_V 0x00000001
#define USB_VBVALIDOVVAL_S 3
/** USB_AVALIDOVEN : R/W; bitpos: [4]; default: 0;
* This bit is used to enable/disable the software to override the Avalid signal using
* the GOTGCTL.AVALIDOVVAL
* 1'b1: Internally Avalid received from the PHY is overridden with
* GOTGCTL_REG.REG_AVALIDOVVAL
* 1'b0: Override is disabled and avalid signal from the respective PHY selected is
* used internally by the core
*/
#define USB_AVALIDOVEN (BIT(4))
#define USB_AVALIDOVEN_M (USB_AVALIDOVEN_V << USB_AVALIDOVEN_S)
#define USB_AVALIDOVEN_V 0x00000001
#define USB_AVALIDOVEN_S 4
/** USB_AVALIDOVVAL : R/W; bitpos: [5]; default: 0;
* A-Peripheral Session Valid OverrideValue
* 1'b0 : Avalid value is 1'b0 when GOTGCTL_REG.USB_AVALIDOVEN =1
* 1'b1 : Avalid value is 1'b1 when GOTGCTL_REG.USB_AVALIDOVEN =1
*/
#define USB_AVALIDOVVAL (BIT(5))
#define USB_AVALIDOVVAL_M (USB_AVALIDOVVAL_V << USB_AVALIDOVVAL_S)
#define USB_AVALIDOVVAL_V 0x00000001
#define USB_AVALIDOVVAL_S 5
/** USB_BVALIDOVEN : R/W; bitpos: [6]; default: 0;
* This bit is used to enable/disable the software to override the Bvalid signal using
* the GOTGCTLREG.BVALIDOVVAL
* 1'b1 : Internally Bvalid received from the PHY is overridden with
* GOTGCTL_REG.USB_BVALIDOVVAL
* 1'b0 : Override is disabled and bvalid signal from the respective PHY selected is
* used internally by the force
*/
#define USB_BVALIDOVEN (BIT(6))
#define USB_BVALIDOVEN_M (USB_BVALIDOVEN_V << USB_BVALIDOVEN_S)
#define USB_BVALIDOVEN_V 0x00000001
#define USB_BVALIDOVEN_S 6
/** USB_BVALIDOVVAL : R/W; bitpos: [7]; default: 0;
* B-Peripheral Session Valid OverrideValue
* 1'b0 : Bvalid value is 1'b0 when GOTGCTL_REG.USB_BVALIDOVEN =1
* 1'b1 : Bvalid value is 1'b1 when GOTGCTL_REG.USB_BVALIDOVEN =1
*/
#define USB_BVALIDOVVAL (BIT(7))
#define USB_BVALIDOVVAL_M (USB_BVALIDOVVAL_V << USB_BVALIDOVVAL_S)
#define USB_BVALIDOVVAL_V 0x00000001
#define USB_BVALIDOVVAL_S 7
/** USB_HSTNEGSCS : RO; bitpos: [8]; default: 0;
* Host Negotiation Success.The controller sets this bit when host negotiation is
* successful. The controller clears this bit when the HNP Request (HNPReq) bit in
* this register is set.
*/
#define USB_HSTNEGSCS (BIT(8))
#define USB_HSTNEGSCS_M (USB_HSTNEGSCS_V << USB_HSTNEGSCS_S)
#define USB_HSTNEGSCS_V 0x00000001
#define USB_HSTNEGSCS_S 8
/** USB_HNPREQ : R/W; bitpos: [9]; default: 0;
* HNP Request .The application sets this bit to initiate an HNP request to the
* Connected USB host. The application can clear this bit by writing a 0 when the Host
* Negotiation Success Status Change bit in the OTG Interrupt register
* (GOTGINT_REG.HSTNEGSUCSTSCHNG) is SET. The controller clears this bit when the
* HSTNEGSUCSTSCHNG bit is cleared.
*/
#define USB_HNPREQ (BIT(9))
#define USB_HNPREQ_M (USB_HNPREQ_V << USB_HNPREQ_S)
#define USB_HNPREQ_V 0x00000001
#define USB_HNPREQ_S 9
/** USB_HSTSETHNPEN : R/W; bitpos: [10]; default: 0;
* Host Set HNP Enable.The application sets this bit when it has successfully enabled
* HNP (using the SetFeature.SetHNPEnable command) on the connected device
* 1'b0: Host Set HNP is not enabled
* 1'b1: Host Set HNP is enabled
*/
#define USB_HSTSETHNPEN (BIT(10))
#define USB_HSTSETHNPEN_M (USB_HSTSETHNPEN_V << USB_HSTSETHNPEN_S)
#define USB_HSTSETHNPEN_V 0x00000001
#define USB_HSTSETHNPEN_S 10
/** USB_DEVHNPEN : R/W; bitpos: [11]; default: 0;
* Device HNP Enabled.The application sets this bit when it successfully receives a
* SetFeature.SetHNPEnable command from the connected USB host
* 1'b0: HNP is not enabled in the application
* 1'b1: HNP is enabled in the application
*/
#define USB_DEVHNPEN (BIT(11))
#define USB_DEVHNPEN_M (USB_DEVHNPEN_V << USB_DEVHNPEN_S)
#define USB_DEVHNPEN_V 0x00000001
#define USB_DEVHNPEN_S 11
/** USB_EHEN : R/W; bitpos: [12]; default: 0;
* Embedded Host Enable.It is used to select between OTG A Device state Machine and
* Embedded Host state machine
* 1'b0: OTG A Device state machine is selected
* 1'b1: Embedded Host State Machine is selected
*/
#define USB_EHEN (BIT(12))
#define USB_EHEN_M (USB_EHEN_V << USB_EHEN_S)
#define USB_EHEN_V 0x00000001
#define USB_EHEN_S 12
/** USB_DBNCEFLTRBYPASS : R/W; bitpos: [15]; default: 0;
* Bypass Debounce filters for avalid, bvalid, vbusvalid, sessend, iddig signals when
* enabled
* 1'b0: Disabled
* 1'b1: Enabled
*/
#define USB_DBNCEFLTRBYPASS (BIT(15))
#define USB_DBNCEFLTRBYPASS_M (USB_DBNCEFLTRBYPASS_V << USB_DBNCEFLTRBYPASS_S)
#define USB_DBNCEFLTRBYPASS_V 0x00000001
#define USB_DBNCEFLTRBYPASS_S 15
/** USB_CONIDSTS : RO; bitpos: [16]; default: 0;
* Connector ID Status. Indicates the connector ID status on a connect event
* 1'b0: The core is in A-Device mode
* 1'b1: The core is in B-Device mode
*/
#define USB_CONIDSTS (BIT(16))
#define USB_CONIDSTS_M (USB_CONIDSTS_V << USB_CONIDSTS_S)
#define USB_CONIDSTS_V 0x00000001
#define USB_CONIDSTS_S 16
/** USB_DBNCTIME : RO; bitpos: [17]; default: 0;
* Long/Short Debounce Time. Indicates the debounce time of a detected connection
* 1'b0: Long debounce time, used for physical connections (100ms + 2.5 micro-sec)
* 1'b1: Short debounce time, used for soft connections (2.5 micro-sec)
*/
#define USB_DBNCTIME (BIT(17))
#define USB_DBNCTIME_M (USB_DBNCTIME_V << USB_DBNCTIME_S)
#define USB_DBNCTIME_V 0x00000001
#define USB_DBN
没有合适的资源?快使用搜索试试~ 我知道了~
esp32-2.0.0.zip
共2000个文件
h:1567个
hpp:414个
md:18个
需积分: 1 0 下载量 64 浏览量
2023-12-25
12:19:40
上传
评论
收藏 132.86MB ZIP 举报
温馨提示
esp32-2.0.0.zip
资源推荐
资源详情
资源评论
收起资源包目录
esp32-2.0.0.zip (2000个子文件)
usb_reg.h 381KB
gpio_reg.h 372KB
nghttp2.h 187KB
rtc_cntl_reg.h 155KB
ssl.h 150KB
compat-1.3.h 128KB
config.h 113KB
efuse_reg.h 110KB
opt.h 110KB
spi_reg.h 110KB
rtc_io_reg.h 106KB
task.h 106KB
task.h 106KB
spi_mem_reg.h 98KB
extmem_reg.h 96KB
utlist.h 80KB
uthash.h 70KB
unity_internals.h 69KB
unity_internals.h 68KB
rmt_reg.h 68KB
esp_config.h 67KB
dl_lib_matrix3dq.h 66KB
sens_reg.h 65KB
esp_mesh.h 65KB
unity.h 65KB
unity.h 65KB
ledc_reg.h 65KB
rsa.h 64KB
i2s_reg.h 64KB
hal.h 63KB
esp_http_server.h 63KB
spi_struct.h 61KB
sensitive_reg.h 58KB
spi_mem_struct.h 57KB
timers.h 56KB
timers.h 56KB
queue.h 56KB
queue.h 56KB
dhm.h 54KB
core.h 54KB
ecp.h 52KB
esp_wifi.h 51KB
rtc_cntl_struct.h 50KB
uhci_reg.h 49KB
hid.h 47KB
semphr.h 46KB
semphr.h 46KB
usbd.h 44KB
adc_ll.h 44KB
i2c_reg.h 43KB
FreeRTOS.h 42KB
FreeRTOS.h 42KB
uart_reg.h 42KB
expat.h 42KB
bignum.h 42KB
spi_ll.h 41KB
interrupt_reg.h 41KB
audio.h 41KB
miniz.h 41KB
miniz.h 40KB
miniz.h 40KB
miniz.h 40KB
miniz.h 40KB
miniz.h 40KB
miniz.h 40KB
miniz.h 40KB
cipher.h 39KB
ssl.h 38KB
esp_wifi_types.h 38KB
bn_mul.h 38KB
touch_sensor_ll.h 37KB
cache.h 37KB
cache.h 37KB
ulp.h 37KB
ssl_internal.h 37KB
system_reg.h 36KB
pcnt_reg.h 36KB
stream_buffer.h 34KB
stream_buffer.h 34KB
message_buffer.h 34KB
message_buffer.h 34KB
lwipopts.h 33KB
protobuf-c.h 33KB
oid.h 32KB
rtc.h 32KB
x509_crt.h 32KB
core-isa.h 32KB
memprot_ll.h 32KB
cache.h 32KB
cache.h 32KB
uart.h 32KB
spi_common_internal.h 31KB
dl_lib_matrix3d.h 31KB
nvs.h 31KB
usbh_ll.h 30KB
usbh_struct.h 30KB
usbh_hal.h 30KB
coreasm.h 30KB
check_config.h 30KB
cp_dma_reg.h 30KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
sixwhen
- 粉丝: 1
- 资源: 207
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功