summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2020-04-08 16:37:09 +0700
committerhathach <[email protected]>2020-04-08 16:37:09 +0700
commit8f17945b6792a326f8dee6abbd49af84a1791209 (patch)
tree0eefb91e19f5452b07e1fc3ac6ea2ea2cc2c0966
parent9014ca55284d755d15c39cd4f721ee60ac239c40 (diff)
move irq for stm32 synopsys
-rw-r--r--hw/bsp/feather_stm32f405/feather_stm32f405.c12
-rw-r--r--hw/bsp/pyboardv11/pyboardv11.c12
-rw-r--r--hw/bsp/stm32f207nucleo/stm32f207nucleo.c12
-rw-r--r--hw/bsp/stm32f401blackpill/stm32f401blackpill.c12
-rw-r--r--hw/bsp/stm32f407disco/stm32f407disco.c12
-rw-r--r--hw/bsp/stm32f411blackpill/stm32f411blackpill.c12
-rw-r--r--hw/bsp/stm32f411disco/stm32f411disco.c13
-rw-r--r--hw/bsp/stm32f412disco/stm32f412disco.c12
-rw-r--r--hw/bsp/stm32f767nucleo/stm32f767nucleo.c12
-rw-r--r--hw/bsp/stm32h743nucleo/stm32h743nucleo.c12
-rw-r--r--hw/bsp/stm32l476disco/stm32l476disco.c12
-rw-r--r--src/portable/st/synopsys/dcd_synopsys.c5
12 files changed, 136 insertions, 2 deletions
diff --git a/hw/bsp/feather_stm32f405/feather_stm32f405.c b/hw/bsp/feather_stm32f405/feather_stm32f405.c
index 16036750c..bdd216272 100644
--- a/hw/bsp/feather_stm32f405/feather_stm32f405.c
+++ b/hw/bsp/feather_stm32f405/feather_stm32f405.c
@@ -29,6 +29,18 @@
#include "stm32f4xx.h"
#include "stm32f4xx_hal_conf.h"
+//--------------------------------------------------------------------+
+// Forward USB interrupt events to TinyUSB IRQ Handler
+//--------------------------------------------------------------------+
+void OTG_FS_IRQHandler(void)
+{
+ tud_irq_handler(0);
+}
+
+//--------------------------------------------------------------------+
+// MACRO TYPEDEF CONSTANT ENUM
+//--------------------------------------------------------------------+
+
// Blue LED is chosen because the other LEDs are connected to ST-LINK lines.
#define LED_PORT GPIOC
#define LED_PIN GPIO_PIN_1
diff --git a/hw/bsp/pyboardv11/pyboardv11.c b/hw/bsp/pyboardv11/pyboardv11.c
index aa8301b44..e6f45b339 100644
--- a/hw/bsp/pyboardv11/pyboardv11.c
+++ b/hw/bsp/pyboardv11/pyboardv11.c
@@ -29,6 +29,18 @@
#include "stm32f4xx.h"
#include "stm32f4xx_hal_conf.h"
+//--------------------------------------------------------------------+
+// Forward USB interrupt events to TinyUSB IRQ Handler
+//--------------------------------------------------------------------+
+void OTG_FS_IRQHandler(void)
+{
+ tud_irq_handler(0);
+}
+
+//--------------------------------------------------------------------+
+// MACRO TYPEDEF CONSTANT ENUM
+//--------------------------------------------------------------------+
+
// Blue LED is chosen because the other LEDs are connected to ST-LINK lines.
#define LED_PORT GPIOB
#define LED_PIN GPIO_PIN_4
diff --git a/hw/bsp/stm32f207nucleo/stm32f207nucleo.c b/hw/bsp/stm32f207nucleo/stm32f207nucleo.c
index 29e69cc88..3d1765e8b 100644
--- a/hw/bsp/stm32f207nucleo/stm32f207nucleo.c
+++ b/hw/bsp/stm32f207nucleo/stm32f207nucleo.c
@@ -28,6 +28,18 @@
#include "stm32f2xx_hal.h"
+//--------------------------------------------------------------------+
+// Forward USB interrupt events to TinyUSB IRQ Handler
+//--------------------------------------------------------------------+
+void OTG_FS_IRQHandler(void)
+{
+ tud_irq_handler(0);
+}
+
+//--------------------------------------------------------------------+
+// MACRO TYPEDEF CONSTANT ENUM
+//--------------------------------------------------------------------+
+
#define LED_PORT GPIOB
#define LED_PIN GPIO_PIN_14
#define LED_STATE_ON 1
diff --git a/hw/bsp/stm32f401blackpill/stm32f401blackpill.c b/hw/bsp/stm32f401blackpill/stm32f401blackpill.c
index 5d3375f01..90507e178 100644
--- a/hw/bsp/stm32f401blackpill/stm32f401blackpill.c
+++ b/hw/bsp/stm32f401blackpill/stm32f401blackpill.c
@@ -29,6 +29,18 @@
#include "stm32f4xx.h"
#include "stm32f4xx_hal_conf.h"
+//--------------------------------------------------------------------+
+// Forward USB interrupt events to TinyUSB IRQ Handler
+//--------------------------------------------------------------------+
+void OTG_FS_IRQHandler(void)
+{
+ tud_irq_handler(0);
+}
+
+//--------------------------------------------------------------------+
+// MACRO TYPEDEF CONSTANT ENUM
+//--------------------------------------------------------------------+
+
#define LED_PORT GPIOC
#define LED_PIN GPIO_PIN_13
#define LED_STATE_ON 1
diff --git a/hw/bsp/stm32f407disco/stm32f407disco.c b/hw/bsp/stm32f407disco/stm32f407disco.c
index c6cc5e9aa..d317ae7df 100644
--- a/hw/bsp/stm32f407disco/stm32f407disco.c
+++ b/hw/bsp/stm32f407disco/stm32f407disco.c
@@ -28,6 +28,18 @@
#include "stm32f4xx_hal.h"
+//--------------------------------------------------------------------+
+// Forward USB interrupt events to TinyUSB IRQ Handler
+//--------------------------------------------------------------------+
+void OTG_FS_IRQHandler(void)
+{
+ tud_irq_handler(0);
+}
+
+//--------------------------------------------------------------------+
+// MACRO TYPEDEF CONSTANT ENUM
+//--------------------------------------------------------------------+
+
#define LED_PORT GPIOD
#define LED_PIN GPIO_PIN_14
#define LED_STATE_ON 1
diff --git a/hw/bsp/stm32f411blackpill/stm32f411blackpill.c b/hw/bsp/stm32f411blackpill/stm32f411blackpill.c
index 3dd74fc71..0d085b20e 100644
--- a/hw/bsp/stm32f411blackpill/stm32f411blackpill.c
+++ b/hw/bsp/stm32f411blackpill/stm32f411blackpill.c
@@ -28,6 +28,18 @@
#include "stm32f4xx_hal.h"
+//--------------------------------------------------------------------+
+// Forward USB interrupt events to TinyUSB IRQ Handler
+//--------------------------------------------------------------------+
+void OTG_FS_IRQHandler(void)
+{
+ tud_irq_handler(0);
+}
+
+//--------------------------------------------------------------------+
+// MACRO TYPEDEF CONSTANT ENUM
+//--------------------------------------------------------------------+
+
#define LED_PORT GPIOC
#define LED_PIN GPIO_PIN_13
#define LED_STATE_ON 1
diff --git a/hw/bsp/stm32f411disco/stm32f411disco.c b/hw/bsp/stm32f411disco/stm32f411disco.c
index 8f97eff01..3f95afb09 100644
--- a/hw/bsp/stm32f411disco/stm32f411disco.c
+++ b/hw/bsp/stm32f411disco/stm32f411disco.c
@@ -25,9 +25,20 @@
*/
#include "../board.h"
-
#include "stm32f4xx_hal.h"
+//--------------------------------------------------------------------+
+// Forward USB interrupt events to TinyUSB IRQ Handler
+//--------------------------------------------------------------------+
+void OTG_FS_IRQHandler(void)
+{
+ tud_irq_handler(0);
+}
+
+//--------------------------------------------------------------------+
+// MACRO TYPEDEF CONSTANT ENUM
+//--------------------------------------------------------------------+
+
// Orange LED
#define LED_PORT GPIOD
#define LED_PIN GPIO_PIN_13
diff --git a/hw/bsp/stm32f412disco/stm32f412disco.c b/hw/bsp/stm32f412disco/stm32f412disco.c
index f64fa3f01..be0731fb6 100644
--- a/hw/bsp/stm32f412disco/stm32f412disco.c
+++ b/hw/bsp/stm32f412disco/stm32f412disco.c
@@ -28,6 +28,18 @@
#include "stm32f4xx_hal.h"
+//--------------------------------------------------------------------+
+// Forward USB interrupt events to TinyUSB IRQ Handler
+//--------------------------------------------------------------------+
+void OTG_FS_IRQHandler(void)
+{
+ tud_irq_handler(0);
+}
+
+//--------------------------------------------------------------------+
+// MACRO TYPEDEF CONSTANT ENUM
+//--------------------------------------------------------------------+
+
#define LED_PORT GPIOE
#define LED_PIN GPIO_PIN_2
#define LED_STATE_ON 0
diff --git a/hw/bsp/stm32f767nucleo/stm32f767nucleo.c b/hw/bsp/stm32f767nucleo/stm32f767nucleo.c
index 7a24bfa71..b9025a42c 100644
--- a/hw/bsp/stm32f767nucleo/stm32f767nucleo.c
+++ b/hw/bsp/stm32f767nucleo/stm32f767nucleo.c
@@ -29,6 +29,18 @@
#include "stm32f7xx_hal.h"
+//--------------------------------------------------------------------+
+// Forward USB interrupt events to TinyUSB IRQ Handler
+//--------------------------------------------------------------------+
+void OTG_FS_IRQHandler(void)
+{
+ tud_irq_handler(0);
+}
+
+//--------------------------------------------------------------------+
+// MACRO TYPEDEF CONSTANT ENUM
+//--------------------------------------------------------------------+
+
#define LED_PORT GPIOB
#define LED_PIN GPIO_PIN_14
#define LED_STATE_ON 1
diff --git a/hw/bsp/stm32h743nucleo/stm32h743nucleo.c b/hw/bsp/stm32h743nucleo/stm32h743nucleo.c
index 593b6e50e..9a758988c 100644
--- a/hw/bsp/stm32h743nucleo/stm32h743nucleo.c
+++ b/hw/bsp/stm32h743nucleo/stm32h743nucleo.c
@@ -29,6 +29,18 @@
#include "stm32h7xx_hal.h"
+//--------------------------------------------------------------------+
+// Forward USB interrupt events to TinyUSB IRQ Handler
+//--------------------------------------------------------------------+
+void OTG_FS_IRQHandler(void)
+{
+ tud_irq_handler(0);
+}
+
+//--------------------------------------------------------------------+
+// MACRO TYPEDEF CONSTANT ENUM
+//--------------------------------------------------------------------+
+
#define LED_PORT GPIOB
#define LED_PIN GPIO_PIN_0
#define LED_STATE_ON 1
diff --git a/hw/bsp/stm32l476disco/stm32l476disco.c b/hw/bsp/stm32l476disco/stm32l476disco.c
index db755c18d..65c544137 100644
--- a/hw/bsp/stm32l476disco/stm32l476disco.c
+++ b/hw/bsp/stm32l476disco/stm32l476disco.c
@@ -28,6 +28,18 @@
#include "stm32l4xx_hal.h"
+//--------------------------------------------------------------------+
+// Forward USB interrupt events to TinyUSB IRQ Handler
+//--------------------------------------------------------------------+
+void OTG_FS_IRQHandler(void)
+{
+ tud_irq_handler(0);
+}
+
+//--------------------------------------------------------------------+
+// MACRO TYPEDEF CONSTANT ENUM
+//--------------------------------------------------------------------+
+
#define LED_PORT GPIOB
#define LED_PIN GPIO_PIN_2
#define LED_STATE_ON 1
diff --git a/src/portable/st/synopsys/dcd_synopsys.c b/src/portable/st/synopsys/dcd_synopsys.c
index c16211a9d..dc752b37a 100644
--- a/src/portable/st/synopsys/dcd_synopsys.c
+++ b/src/portable/st/synopsys/dcd_synopsys.c
@@ -656,7 +656,10 @@ static void handle_epin_ints(USB_OTG_DeviceTypeDef * dev, USB_OTG_INEndpointType
}
}
-void OTG_FS_IRQHandler(void) {
+void dcd_irq_handler(uint8_t rhport) {
+
+ (void) rhport;
+
USB_OTG_DeviceTypeDef * dev = DEVICE_BASE;
USB_OTG_OUTEndpointTypeDef * out_ep = OUT_EP_BASE;
USB_OTG_INEndpointTypeDef * in_ep = IN_EP_BASE;