[gnoduino: 102/237] Merge branch 'new-extension' of https://github.com/arduino/Arduino into new-extension



commit a80c6a189356b37fccf5a92dedbafd2f4de65c99
Merge: e644231 db1e2fc
Author: Zach Eveland <zeveland blacklabel-development com>
Date:   Mon Sep 5 12:53:45 2011 -0400

    Merge branch 'new-extension' of https://github.com/arduino/Arduino into new-extension
    
    Conflicts:
    	build/macosx/dist/tools-universal.zip
    	build/windows/avr_tools.zip
    	hardware/arduino/cores/arduino/HardwareSerial.cpp

 arduino/boards.txt                       |   59 +++++++++++++------
 arduino/cores/arduino/Client.h           |   27 +++++++++
 arduino/cores/arduino/HardwareSerial.cpp |   57 +++++++++++++++++-
 arduino/cores/arduino/HardwareSerial.h   |    2 +
 arduino/cores/arduino/IPAddress.cpp      |   56 ++++++++++++++++++
 arduino/cores/arduino/IPAddress.h        |   76 +++++++++++++++++++++++++
 arduino/cores/arduino/Print.h            |    2 +-
 arduino/cores/arduino/Printable.h        |    3 +
 arduino/cores/arduino/Server.h           |    9 +++
 arduino/cores/arduino/Udp.h              |   90 ++++++++++++++++++++++++++++++
 arduino/cores/arduino/main.cpp           |    4 +-
 arduino/cores/arduino/new.cpp            |   18 ++++++
 arduino/cores/arduino/new.h              |   22 +++++++
 13 files changed, 400 insertions(+), 25 deletions(-)
---
diff --cc arduino/boards.txt
index f6bd36e,fb2a1cd..57fe222
--- a/arduino/boards.txt
+++ b/arduino/boards.txt
@@@ -1,25 -1,7 +1,25 @@@
  ##############################################################
  
 +leonardo.name=Arduino Leonardo
 +leonardo.upload.protocol=stk500
 +leonardo.upload.maximum_size=30720
 +leonardo.upload.speed=300
 +leonardo.bootloader.low_fuses=0xde
 +leonardo.bootloader.high_fuses=0xd8
 +leonardo.bootloader.extended_fuses=0xf3
 +leonardo.bootloader.path=diskloader
 +leonardo.bootloader.file=DiskLoader.hex
 +leonardo.bootloader.unlock_bits=0x3F
 +leonardo.bootloader.lock_bits=0x0F
 +leonardo.build.mcu=atmega32u4
 +leonardo.build.f_cpu=16000000L
 +leonardo.build.core=arduino
 +leonardo.build.variant=leonardo
 +
 +##############################################################
 +
  uno.name=Arduino Uno
- uno.upload.protocol=stk500
+ uno.upload.protocol=arduino
  uno.upload.maximum_size=32256
  uno.upload.speed=115200
  uno.bootloader.low_fuses=0xff
diff --cc arduino/cores/arduino/HardwareSerial.cpp
index 48f5fd3,3ed8d07..a31b266
--- a/arduino/cores/arduino/HardwareSerial.cpp
+++ b/arduino/cores/arduino/HardwareSerial.cpp
@@@ -115,10 -110,9 +117,10 @@@ inline void store_char(unsigned char c
      #error UDR not defined
    #endif
      store_char(c, &rx_buffer);
- 	serialEvent();
+     serialEvent_flag = 1;
    }
  #endif
 +#endif
  
  #if defined(USART1_RX_vect)
    void serialEvent1() __attribute__((weak));
@@@ -159,9 -159,44 +167,50 @@@
    #error SIG_USART3_RECV
  #endif
  
++<<<<<<< HEAD
 +#if !defined(USART0_UDRE_vect) && defined(USART1_UDRE_vect)
 +// do nothing - on the 32u4 the first USART is USART1
 +#else
++=======
+ void serialEventRun(void)
+ {
+   unsigned char flag, oldSREG;
+ #ifdef serialEvent_implemented
+   oldSREG = SREG;
+   noInterrupts();
+   flag = serialEvent_flag;
+   serialEvent_flag = 0;
+   SREG = oldSREG;
+   if (flag) serialEvent();
+ #endif
+ #ifdef serialEvent1_implemented
+   oldSREG = SREG;
+   noInterrupts();
+   flag = serialEvent1_flag;
+   serialEvent1_flag = 0;
+   SREG = oldSREG;
+   if (flag) serialEvent1();
+ #endif
+ #ifdef serialEvent2_implemented
+   oldSREG = SREG;
+   noInterrupts();
+   flag = serialEvent2_flag;
+   serialEvent2_flag = 0;
+   SREG = oldSREG;
+   if (flag) serialEvent2();
+ #endif
+ #ifdef serialEvent3_implemented
+   oldSREG = SREG;
+   noInterrupts();
+   flag = serialEvent3_flag;
+   serialEvent3_flag = 0;
+   SREG = oldSREG;
+   if (flag) serialEvent3();
+ #endif
+ }
+ 
+ 
++>>>>>>> 0c92f230b5202b241de875a3baff9dfd1cf7a618
  #if !defined(UART0_UDRE_vect) && !defined(UART_UDRE_vect) && !defined(USART0_UDRE_vect) && !defined(USART_UDRE_vect)
    #error Don't know what the Data Register Empty vector is called for the first UART
  #else
diff --cc arduino/cores/arduino/main.cpp
index ba00ae0,1c2ea9a..097f5ed
--- a/arduino/cores/arduino/main.cpp
+++ b/arduino/cores/arduino/main.cpp
@@@ -5,14 -5,12 +5,16 @@@ int main(void
  {
  	init();
  
 +#if defined(USBCON)
 +	USB.attach();
 +#endif
 +	
  	setup();
      
- 	for (;;)
+ 	for (;;) {
  		loop();
+ 		serialEventRun();
+ 	}
          
  	return 0;
  }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]