loupiottes/dmx512_micro_ino/arduino-hardware.patch
tzim 8367b66485 Meilleure fermeture du driver en cas d'erreur persistante
ajout de gestion des temps brk&mab sur arduinov3
2014-05-05 14:06:43 +00:00

92 lines
2.8 KiB
Diff

diff -ur a/hardware/arduino/cores/arduino/CDC.cpp b/hardware/arduino/cores/arduino/CDC.cpp
--- a/hardware/arduino/cores/arduino/CDC.cpp 2012-10-02 21:28:19.000000000 +0200
+++ b/hardware/arduino/cores/arduino/CDC.cpp 2014-05-05 15:00:45.714075984 +0200
@@ -138,6 +138,11 @@
{
}
+void WEAK CDC_accept(void)
+{
+ Serial.accept();
+}
+
void Serial_::accept(void)
{
ring_buffer *buffer = &cdc_rx_buffer;
diff -ur a/hardware/arduino/cores/arduino/USBAPI.h b/hardware/arduino/cores/arduino/USBAPI.h
--- a/hardware/arduino/cores/arduino/USBAPI.h 2012-10-02 21:28:19.000000000 +0200
+++ b/hardware/arduino/cores/arduino/USBAPI.h 2014-05-05 11:52:14.345644654 +0200
@@ -174,6 +174,8 @@
int CDC_GetDescriptor(int i);
bool CDC_Setup(Setup& setup);
+void CDC_accept(void);
+
//================================================================================
//================================================================================
@@ -192,4 +194,4 @@
#endif
-#endif /* if defined(USBCON) */
\ Pas de fin de ligne à la fin du fichier
+#endif /* if defined(USBCON) */
diff -ur a/hardware/arduino/cores/arduino/USBCore.cpp b/hardware/arduino/cores/arduino/USBCore.cpp
--- a/hardware/arduino/cores/arduino/USBCore.cpp 2012-10-02 21:28:19.000000000 +0200
+++ b/hardware/arduino/cores/arduino/USBCore.cpp 2014-05-05 14:07:31.033024833 +0200
@@ -49,19 +49,19 @@
0x0409 // English
};
-const u16 STRING_IPRODUCT[17] = {
- (3<<8) | (2+2*16),
+const u16 STRING_IPRODUCT[13] = {
+ (3<<8) | (2+2*12),
#if USB_PID == 0x8036
- 'A','r','d','u','i','n','o',' ','L','e','o','n','a','r','d','o'
+ 'D','M','X','v','3',' ','M','i','c','r','o'
#else
'U','S','B',' ','I','O',' ','B','o','a','r','d',' ',' ',' ',' '
#endif
};
-const u16 STRING_IMANUFACTURER[12] = {
- (3<<8) | (2+2*11),
+const u16 STRING_IMANUFACTURER[11] = {
+ (3<<8) | (2+2*10),
#if USB_VID == 0x2341
- 'A','r','d','u','i','n','o',' ','L','L','C'
+ 'L','o','u','p','i','o','t','t','e','s'
#else
'U','n','k','n','o','w','n',' ',' ',' ',' '
#endif
@@ -604,13 +604,13 @@
#ifdef CDC_ENABLED
USB_Flush(CDC_TX); // Send a tx frame if found
while (USB_Available(CDC_RX)) // Handle received bytes (if any)
- Serial.accept();
+ CDC_accept();
#endif
// check whether the one-shot period has elapsed. if so, turn off the LED
- if (TxLEDPulse && !(--TxLEDPulse))
+ //if (TxLEDPulse && !(--TxLEDPulse))
TXLED0;
- if (RxLEDPulse && !(--RxLEDPulse))
+ //if (RxLEDPulse && !(--RxLEDPulse))
RXLED0;
}
}
diff -ur a/hardware/arduino/cores/arduino/USBDesc.h b/hardware/arduino/cores/arduino/USBDesc.h
--- a/hardware/arduino/cores/arduino/USBDesc.h 2012-10-02 21:28:19.000000000 +0200
+++ b/hardware/arduino/cores/arduino/USBDesc.h 2014-05-05 14:00:00.523148732 +0200
@@ -17,7 +17,7 @@
*/
#define CDC_ENABLED
-#define HID_ENABLED
+//#define HID_ENABLED
#ifdef CDC_ENABLED