Commit Graph

667 Commits

Author SHA1 Message Date
Cristian Maglie b4fc466b47 initVariant() is now declared as external "C" function.
See #2080 for more details.
2014-06-27 14:26:32 +02:00
Cristian Maglie 7a31770a9a Allow variants to define an initVariant() function that is called at startup.
See #2080
2014-06-19 19:49:47 +02:00
Cristian Maglie f599d51996 Fixed regression in USBAPI and CDC (xaljox)
See:
9ac7e30252 (commitcomment-6718676)
2014-06-19 16:52:48 +02:00
Embedded Micro 12219b37d5 Update USBAPI.h
Fixes bug where Serial.read() would always return 0 as the first byte.
2014-06-10 08:48:23 -07:00
Cristian Maglie 2d72650feb Merge pull request #2104 from amulya349/master
Fix of a bug in Stream.cpp
2014-06-02 10:37:37 +02:00
Cristian Maglie 29b0b63d1c USB CDC available() method returns correct number of bytes in buffer.
See #1953
2014-05-30 10:46:46 +02:00
Amulya Kumar Sahoo 2f98fe16d7 Fix of a bug
Stream::find(char *target) passes NULL as “terminator” to Stream::findUntil(char *target, char *terminator), which immediately dereferences it by passing it on to strlen() :
 
bool Stream::find(char *target)
{
  return findUntil(target, NULL);
}
 
// as find but search ends if the terminator string is found
bool Stream::findUntil(char *target, char *terminator)
{
  return findUntil(target, strlen(target), terminator, strlen(terminator));
}
2014-05-30 11:47:08 +05:30
Amulya Kumar Sahoo 43a8a0f433 Fix of a bug
Stream::find(char *target) passes NULL as “terminator” to Stream::findUntil(char *target, char *terminator), which immediately dereferences it by passing it on to strlen():
 
bool Stream::find(char *target)
{
  return findUntil(target, NULL);
}
 
// as find but search ends if the terminator string is found
bool Stream::findUntil(char *target, char *terminator)
{
  return findUntil(target, strlen(target), terminator, strlen(terminator));
}
2014-05-30 11:44:50 +05:30
Paul Brook 5962f155f7 Improve CDC read code
Read CDC data from USB FIFO on demand instead of in ISR.
Remove superfluous ring buffer.

Signed-off-by: Paul Brook <paul@nowt.org>
2014-05-24 00:34:56 +02:00
Paul Brook b57b2ae3c1 Fix race condition in USB CDC transmit
If the Start of Frame interrupt triggers just after the call
to USB_SendSpace in USB_Send then we can get data loss.
When the first bank is full and the second partially full,
the SOF handler will release the second bank via USB_Flush.
Data is then lost due to overflow as USB_Send continues writing data
to the now-closed bank.

Fix this by re-checking the FIFO status inside LockEP, immediately before
doing the data write.

Signed-off-by: Paul Brook <paul@nowt.org>
2014-05-24 00:34:56 +02:00
Justin Rajewski 872c88bb5f improved USB write speeds 2014-05-24 00:34:56 +02:00
Cristian Maglie f3e78a4a29 Backported Print class from ide-1.5.x branch
Close #1951
2014-05-24 00:13:07 +02:00
Zachary J. Fields c16768565b Match return value to type in available() 2014-05-07 17:39:08 -07:00
Matt Jenkins 908c526c4c Import WString from 1.5.6 2014-04-01 14:46:13 +01:00
Matt Jenkins 3fb1c595d1 Fixed string constructor overloading bug 2014-04-01 14:02:17 +01:00
Cristian Maglie 823d958418 Added license for Client, IPAddressm and Server (master branch)
See #1847 and #1117
2014-02-13 17:49:14 +01:00
Cristian Maglie 291f5493ec Added license for Arduino.h, binary.h and main.cpp (master branch)
See #1847 and #1117
2014-02-13 17:48:47 +01:00
Cristian Maglie 23b682417e Revert "Changed pins definition in variants from constants to #defines."
This reverts commit 7fcba37acfd11313640b3f5d5c813d63d2f59999.
2014-02-12 14:46:48 +01:00
Cristian Maglie 1a7346f8e4 Merge branch 'master' of github.com:arduino/Arduino 2013-12-13 18:26:44 +01:00
Cristian Maglie a2cc9674ba Changed pins definition in variants from constants to #defines. 2013-12-13 14:37:26 +01:00
ntruchsess faffdc1585 remove all Changes besides operator== 2013-12-06 19:05:31 +01:00
ntruchsess 6cdf45953f add localPort to EthernetClient, simplify operator== 2013-11-27 10:40:57 +01:00
ntruchsess 68e218dda8 add operator==, remoteIP and remotePort to EthernetClient 2013-11-26 00:12:44 +01:00
Cristian Maglie 3b51f9589f Fix SERIAL_* metadata in Arduino Ethernet variant 2013-11-11 13:54:50 +01:00
Cristian Maglie 2398409fbf Added SERIAL metadata into variant files. 2013-11-11 11:39:37 +01:00
Cristian Maglie 9d48a36616 Changed LED_BUILTIN to a macro to better support boards that do not have a built-in LED.
Fixes #758
2013-11-03 18:10:22 +01:00
Cristian Maglie 0e5e67e23d Added LED_BUILTIN constant to Leonardo board 2013-11-03 18:07:01 +01:00
Cristian Maglie 24dc51bfde Added Arduino Ethernet variant.
Fixes #925
2013-11-03 13:52:08 +01:00
Jacques Supcik 85018c2f47 Fix indentation (cosmetic) 2013-10-06 10:59:53 +02:00
Paul Brook 0ade989a2d USB CDC two argument begin()
Add two argument form of Serial_::begin

Signed-off-by: Paul Brook <paul@nowt.org>
2013-09-02 19:15:12 +01:00
Paul Brook c2a0030473 USB serial baud arg type
Make USB Serial_::begin() function take an unsigned long argument for
consistency with HardwareSerial.

Signed-off-by: Paul Brook <paul@nowt.org>
2013-09-02 19:02:55 +01:00
Xun Yang aaaa2c3ab6 Fixed robot libraries and examples for unified Arduino core 2013-08-21 23:14:00 +02:00
Cristian Maglie 40b622a5d1 Merge branch 'issue1366' of github.com:Lauszus/Arduino into Lauszus-issue1366 2013-07-31 17:22:12 +02:00
Tevin Zhang c8a79d0d0c add String.toFloat 2013-06-06 16:19:34 +02:00
Ryan Esteves 6bef2ada06 Added remove methods to WString 2013-06-05 14:08:59 -04:00
Cristian Maglie ef4e8c6537 Robot has its own core 2013-05-17 11:02:00 +02:00
Cristian Maglie 44c5dae865 Merge branch 'robot' 2013-05-15 11:16:09 +02:00
Fede85 cc5f2a52b4 Added support to INT6 on Leonardo.
Fixes #988
2013-05-13 21:22:59 +02:00
Cristian Maglie 08afd2dd60 Added robot hardware 2013-05-13 19:50:59 +02:00
Cristian Maglie eb40f35b2d Added const modifier to String.c_str() 2013-05-06 18:10:29 +02:00
Cristian Maglie 8673113e43 Added c_str() method to String class. 2013-05-06 08:57:06 +02:00
Cristian Maglie ccf7eb9a56 Stream "_timeout" field and related methods are now protected instead of private.
This allows better optimization on classes that extends Stream without losing
timeout capabilities.
2013-05-06 08:52:31 +02:00
Kristian Sloth Lauszus 8d7deb7a1f Removed double instance of the same code 2013-05-02 01:00:17 +02:00
Kristian Sloth Lauszus 0a7b402c45 Check if ATmega32u4 is defined
Needed in order to work with Arduino Leonardo
2013-04-18 00:15:06 +02:00
Kristian Sloth Lauszus 8d26462be2 Removed call to analogPinToChannel for Leonardo 2013-04-18 00:07:33 +02:00
Kristian Sloth Lauszus b9717187fd Use analogPinToChannel if it's defined 2013-04-17 19:49:40 +02:00
Kristian Sloth Lauszus ed42d95412 Added support for all variants of Sanguino 2013-04-04 20:55:15 +02:00
Cristian Maglie f50c307be2 Fix deprecated ISR names for ATmega8.
See #881
2013-03-29 15:17:54 +01:00
Cristian Maglie ab41589c2b Removed deprecated interrupt handlers
Fixes #831 #881 #955 #1123 #1140
2013-03-29 14:41:36 +01:00
Cristian Maglie f39a246be5 Increased malloc margin to 128.
https://github.com/arduino/Arduino/pull/1329#issuecomment-15609148
See #857 #1329
2013-03-29 11:48:35 +01:00