aboutsummaryrefslogtreecommitdiff
path: root/include/libopencm3
diff options
context:
space:
mode:
Diffstat (limited to 'include/libopencm3')
-rw-r--r--include/libopencm3/stm32/nvic.h8
-rw-r--r--include/libopencm3/stm32/otg_fs.h12
-rw-r--r--include/libopencm3/usb/usbd.h2
3 files changed, 22 insertions, 0 deletions
diff --git a/include/libopencm3/stm32/nvic.h b/include/libopencm3/stm32/nvic.h
index ce8132f..d29c425 100644
--- a/include/libopencm3/stm32/nvic.h
+++ b/include/libopencm3/stm32/nvic.h
@@ -138,6 +138,14 @@
#define NVIC_DMA2_CHANNEL2_IRQ 57
#define NVIC_DMA2_CHANNEL3_IRQ 58
#define NVIC_DMA2_CHANNEL4_5_IRQ 59
+#define NVIC_DMA2_CHANNEL5_IRQ 60
+#define NVIC_ETH_IRQ 61
+#define NVIC_ETH_WKUP_IRQ 62
+#define NVIC_CAN2_TX_IRQ 63
+#define NVIC_CAN2_RX0_IRQ 64
+#define NVIC_CAN2_RX1_IRQ 65
+#define NVIC_CAN2_SCE_IRQ 66
+#define NVIC_OTG_FS_IRQ 67
/* --- NVIC functions ------------------------------------------------------ */
diff --git a/include/libopencm3/stm32/otg_fs.h b/include/libopencm3/stm32/otg_fs.h
index d39593e..e1d7a6a 100644
--- a/include/libopencm3/stm32/otg_fs.h
+++ b/include/libopencm3/stm32/otg_fs.h
@@ -250,6 +250,7 @@
#define OTG_FS_DIEPCTL0_EPENA (1 << 31)
#define OTG_FS_DIEPCTL0_EPDIS (1 << 30)
/* Bits 29:28 - Reserved */
+#define OTG_FS_DIEPCTLX_SD0PID (1 << 28)
#define OTG_FS_DIEPCTL0_SNAK (1 << 27)
#define OTG_FS_DIEPCTL0_CNAK (1 << 26)
#define OTG_FS_DIEPCTL0_TXFNUM_MASK (0xf << 22)
@@ -270,6 +271,7 @@
#define OTG_FS_DOEPCTL0_EPENA (1 << 31)
#define OTG_FS_DOEPCTL0_EPDIS (1 << 30)
/* Bits 29:28 - Reserved */
+#define OTG_FS_DOEPCTLX_SD0PID (1 << 28)
#define OTG_FS_DOEPCTL0_SNAK (1 << 27)
#define OTG_FS_DOEPCTL0_CNAK (1 << 26)
/* Bits 25:22 - Reserved */
@@ -297,6 +299,16 @@
#define OTG_FS_DIEPINTX_EPDISD (1 << 1)
#define OTG_FS_DIEPINTX_XFRC (1 << 0)
+/* OTG_FS Device IN Endpoint Interrupt Register (OTG_FS_DOEPINTx) */
+/* Bits 31:7 - Reserved */
+#define OTG_FS_DOEPINTX_B2BSTUP (1 << 6)
+/* Bit 5 - Reserved */
+#define OTG_FS_DOEPINTX_OTEPDIS (1 << 4)
+#define OTG_FS_DOEPINTX_STUP (1 << 3)
+/* Bit 2 - Reserved */
+#define OTG_FS_DOEPINTX_EPDISD (1 << 1)
+#define OTG_FS_DOEPINTX_XFRC (1 << 0)
+
/* OTG_FS Device OUT Endpoint 0 Transfer Size Regsiter (OTG_FS_DOEPTSIZ0) */
/* Bit 31 - Reserved */
#define OTG_FS_DIEPSIZ0_STUPCNT_1 (0x1 << 29)
diff --git a/include/libopencm3/usb/usbd.h b/include/libopencm3/usb/usbd.h
index fab6304..c73de07 100644
--- a/include/libopencm3/usb/usbd.h
+++ b/include/libopencm3/usb/usbd.h
@@ -65,6 +65,8 @@ extern u16 usbd_ep_read_packet(u8 addr, void *buf, u16 len);
extern void usbd_ep_stall_set(u8 addr, u8 stall);
extern u8 usbd_ep_stall_get(u8 addr);
+extern void usbd_ep_nak_set(u8 addr, u8 nak);
+
/* Optional */
extern void usbd_cable_connect(u8 on);