-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path0001-fix-arduino-bootloaders.patch
45 lines (40 loc) · 1.82 KB
/
0001-fix-arduino-bootloaders.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
diff --git a/hw/bsp/ra/boards/portenta_c33/board.h b/hw/bsp/ra/boards/portenta_c33/board.h
index 7841ec8b8..8442afe5e 100644
--- a/hw/bsp/ra/boards/portenta_c33/board.h
+++ b/hw/bsp/ra/boards/portenta_c33/board.h
@@ -32,7 +32,7 @@ extern "C" {
#endif
#define LED1 BSP_IO_PORT_01_PIN_07 // Red LED
-#define LED_STATE_ON 1
+#define LED_STATE_ON 0
#define SW1 BSP_IO_PORT_04_PIN_08 // D12
#define BUTTON_STATE_ACTIVE 0
diff --git a/hw/bsp/ra/family.c b/hw/bsp/ra/family.c
index 16332be17..07d6fd65d 100644
--- a/hw/bsp/ra/family.c
+++ b/hw/bsp/ra/family.c
@@ -60,6 +60,7 @@ static ioport_instance_ctrl_t port_ctrl;
// Vector Data
//--------------------------------------------------------------------+
+#ifndef OVERRIDE_VECTOR_TABLE
BSP_DONT_REMOVE BSP_PLACE_IN_SECTION(BSP_SECTION_APPLICATION_VECTORS)
const fsp_vector_t g_vector_table[BSP_ICU_VECTOR_MAX_ENTRIES] = {
[0] = usbfs_interrupt_handler, /* USBFS INT (USBFS interrupt) */
@@ -89,6 +90,7 @@ const bsp_interrupt_event_t g_interrupt_event_link_select[BSP_ICU_VECTOR_MAX_ENT
[6] = BSP_PRV_IELS_ENUM(EVENT_USBHS_FIFO_1), /* USBHS FIFO 1 (DMA transfer request 1) */
#endif
};
+#endif
//--------------------------------------------------------------------+
// Board porting API
diff --git a/src/portable/renesas/rusb2/dcd_rusb2.c b/src/portable/renesas/rusb2/dcd_rusb2.c
index 24edc30e7..e3edde467 100644
--- a/src/portable/renesas/rusb2/dcd_rusb2.c
+++ b/src/portable/renesas/rusb2/dcd_rusb2.c
@@ -452,6 +452,7 @@ static void process_status_completion(uint8_t rhport)
static bool process_pipe0_xfer(rusb2_reg_t* rusb, int buffer_type, uint8_t ep_addr, void* buffer, uint16_t total_bytes)
{
+ assert (rusb != NULL);
/* configure fifo direction and access unit settings */
if ( ep_addr ) {
/* IN, 2 bytes */