Explorar o código

Merge from current master. Fixed a compilation error with the GNUC toolchain

Wini-Buh %!s(int64=4) %!d(string=hai) anos
pai
achega
36ba9608bd
Modificáronse 2 ficheiros con 8 adicións e 10 borrados
  1. 7 6
      src/portable/renesas/usba/dcd_usba.c
  2. 1 4
      src/tusb_option.h

+ 7 - 6
src/portable/renesas/usba/dcd_usba.c

@@ -2,6 +2,7 @@
  * The MIT License (MIT)
  * The MIT License (MIT)
  *
  *
  * Copyright (c) 2020 Koji Kitayama
  * Copyright (c) 2020 Koji Kitayama
+ * Portions copyrighted (c) 2021 Roland Winistoerfer
  *
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
  * of this software and associated documentation files (the "Software"), to deal
@@ -26,13 +27,9 @@
 
 
 #include "tusb_option.h"
 #include "tusb_option.h"
 
 
-<<<<<<< HEAD
-#if TUSB_OPT_DEVICE_ENABLED && (( CFG_TUSB_MCU == OPT_MCU_RX63X ) || ( CFG_TUSB_MCU == OPT_MCU_RX72N ))
-
-=======
 #if TUSB_OPT_DEVICE_ENABLED && ( CFG_TUSB_MCU == OPT_MCU_RX63X || \
 #if TUSB_OPT_DEVICE_ENABLED && ( CFG_TUSB_MCU == OPT_MCU_RX63X || \
-                                 CFG_TUSB_MCU == OPT_MCU_RX65X)
->>>>>>> origin/master
+                                 CFG_TUSB_MCU == OPT_MCU_RX65X || \
+                                 CFG_TUSB_MCU == OPT_MCU_RX72N )
 #include "device/dcd.h"
 #include "device/dcd.h"
 #include "iodefine.h"
 #include "iodefine.h"
 
 
@@ -524,7 +521,11 @@ static void process_set_address(uint8_t rhport)
   const uint32_t addr = USB0.USBADDR.BIT.USBADDR;
   const uint32_t addr = USB0.USBADDR.BIT.USBADDR;
   if (!addr) return;
   if (!addr) return;
   const tusb_control_request_t setup_packet = {
   const tusb_control_request_t setup_packet = {
+#if defined(__GNUC__)
+      .bmRequestType = 0,
+#else
       .bmRequestType = { 0 },  /* Note: CCRX needs the braces over this struct member */
       .bmRequestType = { 0 },  /* Note: CCRX needs the braces over this struct member */
+#endif
       .bRequest      = 5,
       .bRequest      = 5,
       .wValue        = addr,
       .wValue        = addr,
       .wIndex        = 0,
       .wIndex        = 0,

+ 1 - 4
src/tusb_option.h

@@ -113,11 +113,8 @@
 
 
 // Renesas RX
 // Renesas RX
 #define OPT_MCU_RX63X            1400 ///< Renesas RX63N/631
 #define OPT_MCU_RX63X            1400 ///< Renesas RX63N/631
-<<<<<<< HEAD
-#define OPT_MCU_RX72N            1401 ///< Renesas RX72N
-=======
 #define OPT_MCU_RX65X            1401 ///< Renesas RX65N/RX651
 #define OPT_MCU_RX65X            1401 ///< Renesas RX65N/RX651
->>>>>>> origin/master
+#define OPT_MCU_RX72N            1402 ///< Renesas RX72N
 
 
 // Mind Motion
 // Mind Motion
 #define OPT_MCU_MM32F327X        1500 ///< Mind Motion MM32F327
 #define OPT_MCU_MM32F327X        1500 ///< Mind Motion MM32F327