libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
hg/usb.h
Go to the documentation of this file.
1
/** @defgroup usb_defines USB Defines
2
*
3
* @brief <b>Defined Constants and Types for the USB module</b>
4
*
5
* @ingroup EFM32HG_defines
6
*
7
* LGPL License Terms @ref lgpl_license
8
*/
9
/*
10
* This file is part of the libopencm3 project.
11
*
12
* Copyright (C) 2015 Kuldeep Singh Dhaka <kuldeepdhaka9@gmail.com>
13
* Copyright (C) 2018 Seb Holzapfel <schnommus@gmail.com>
14
*
15
* This library is free software: you can redistribute it and/or modify
16
* it under the terms of the GNU Lesser General Public License as published by
17
* the Free Software Foundation, either version 3 of the License, or
18
* (at your option) any later version.
19
*
20
* This library is distributed in the hope that it will be useful,
21
* but WITHOUT ANY WARRANTY; without even the implied warranty of
22
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
* GNU Lesser General Public License for more details.
24
*
25
* You should have received a copy of the GNU Lesser General Public License
26
* along with this library. If not, see <http://www.gnu.org/licenses/>.
27
*/
28
29
#pragma once
30
31
#include <
libopencm3/cm3/common.h
>
32
#include <
libopencm3/usb/dwc/otg_fs.h
>
33
34
/**@{*/
35
36
#define USB_CTRL MMIO32(USB_BASE + 0x000)
37
#define USB_STATUS MMIO32(USB_BASE + 0x004)
38
#define USB_IF MMIO32(USB_BASE + 0x008)
39
#define USB_IFS MMIO32(USB_BASE + 0x00C)
40
#define USB_IFC MMIO32(USB_BASE + 0x010)
41
#define USB_IEN MMIO32(USB_BASE + 0x014)
42
#define USB_ROUTE MMIO32(USB_BASE + 0x018)
43
44
/* USB_CTRL */
45
/* Bits 31:26 - Reserved */
46
#define USB_CTRL_BIASPROGEM23_MASK (0x3 << 24)
47
/* Bits 23:22 - Reserved */
48
#define USB_CTRL_BIASPROGEM01_MASK (0x3 << 20)
49
/* Bits 19:18 - Reserved */
50
#define USB_CTRL_VREGOSEN (1 << 17)
51
#define USB_CTRL_VREGDIS (1 << 16)
52
/* Bits 15:10 - Reserved */
53
#define USB_CTRL_LEMIDLEEN (1 << 9)
54
/* Bit 8 - Reserved */
55
#define USB_CTRL_LEMPHYCTRL (1 << 7)
56
/* Bit 6 - Reserved */
57
#define USB_CTRL_LEMOSCCTRL_MASK (0x3 << 4)
58
#define USB_CTRL_LEMOSCCTRL_NONE (0x0 << 4)
59
#define USB_CTRL_LEMOSCCTRL_GATE (0x1 << 4)
60
/* Bits 3:2 - Reserved */
61
#define USB_CTRL_DMPUAP (1 << 1)
62
/* Bit 0 - Reserved */
63
64
/* USB_ROUTE */
65
/* Bits 31:3 - Reserved */
66
#define USB_ROUTE_DMPUPEN (1 << 2)
67
/* Bit 1 - Reserved */
68
#define USB_ROUTE_PHYPEN (1 << 0)
69
70
/**@}*/
common.h
otg_fs.h
include
libopencm3
efm32
hg
usb.h
Generated on Tue Mar 7 2023 16:12:32 for libopencm3 by
1.9.4