1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-30 11:24:12 +01:00
Commit Graph

297 Commits

Author SHA1 Message Date
Cristian Maglie
6ecb174c40 Backported 'yield()' hook from 1.5.x 2014-12-02 22:15:57 +01:00
Cristian Maglie
62cf4b6b55 Revert "Match return value to type in available()"
This reverts commit f40e471354.
Added an hint for the buffer sizes.

See #2057
Fixes #2367
2014-10-21 17:18:26 +02:00
Cristian Maglie
58b6fd4789 Fixed missing NOT_AN_INTERRUPT constant in digitalPinToInterrupt()
Fixes #2379
2014-10-21 16:55:37 +02:00
Christopher Andrews
1bbcb2f9d4 Added replacement stub for cstdlib atexit() funciton.
This is an empty stub to simply allow use of complex types with a
non global static lifetime. For more complex handling the function
'atexit' can be redefined in user code.

For more information see:

https://github.com/arduino/Arduino/pull/2229
https://github.com/arduino/Arduino/issues/1919
2014-08-08 15:38:57 +02:00
Cristian Maglie
163b60ee29 Merge pull request #2206 from amulya349/master
Fix of a bug #2199
2014-07-24 14:40:52 +02:00
Amulya Kumar Sahoo
865594d132 Fix of a bug 2014-07-23 01:03:44 +05:30
Cristian Maglie
bb095a2a59 initVariant() is now declared as external "C" function.
See #2080 for more details.
2014-06-27 14:26:32 +02:00
Cristian Maglie
40270306e0 Allow variants to define an initVariant() function that is called at startup.
See #2080
2014-06-19 19:49:47 +02:00
Cristian Maglie
11e02db954 Fixed regression in USBAPI and CDC (xaljox)
See:
9ac7e30252 (commitcomment-6718676)
2014-06-19 16:52:48 +02:00
Embedded Micro
9ac7e30252 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
1918966aef Merge pull request #2104 from amulya349/master
Fix of a bug in Stream.cpp
2014-06-02 10:37:37 +02:00
Cristian Maglie
6914af0d63 USB CDC available() method returns correct number of bytes in buffer.
See #1953
2014-05-30 10:46:46 +02:00
Amulya Kumar Sahoo
2c3058b2d5 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
91f0dbc9ec 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
ddbb6b3914 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
13c0db5834 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
b822091a78 improved USB write speeds 2014-05-24 00:34:56 +02:00
Cristian Maglie
44b5096e05 Backported Print class from ide-1.5.x branch
Close #1951
2014-05-24 00:13:07 +02:00
Zachary J. Fields
f40e471354 Match return value to type in available() 2014-05-07 17:39:08 -07:00
Matt Jenkins
8a1fffdb8e Import WString from 1.5.6 2014-04-01 14:46:13 +01:00
Matt Jenkins
5bc28a178f Fixed string constructor overloading bug 2014-04-01 14:02:17 +01:00
Cristian Maglie
cc6d7cdbd1 Added license for Client, IPAddressm and Server (master branch)
See #1847 and #1117
2014-02-13 17:49:14 +01:00
Cristian Maglie
8eaaeebadf Added license for Arduino.h, binary.h and main.cpp (master branch)
See #1847 and #1117
2014-02-13 17:48:47 +01:00
Paul Brook
f53fcdd254 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
1162a45fa8 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
Cristian Maglie
293e46bfb4 Merge branch 'issue1366' of github.com:Lauszus/Arduino into Lauszus-issue1366 2013-07-31 17:22:12 +02:00
Tevin Zhang
82a2c1d3d9 add String.toFloat 2013-06-06 16:19:34 +02:00
Ryan Esteves
0778f8a3f3 Added remove methods to WString 2013-06-05 14:08:59 -04:00
Cristian Maglie
eab4a7ef72 Robot has its own core 2013-05-17 11:02:00 +02:00
Fede85
2387046c19 Added support to INT6 on Leonardo.
Fixes #988
2013-05-13 21:22:59 +02:00
Cristian Maglie
444ede099d Added const modifier to String.c_str() 2013-05-06 18:10:29 +02:00
Cristian Maglie
19e4d38725 Added c_str() method to String class. 2013-05-06 08:57:06 +02:00
Cristian Maglie
99f2a27553 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
dbd584e438 Removed double instance of the same code 2013-05-02 01:00:17 +02:00
Kristian Sloth Lauszus
59c5b94c51 Check if ATmega32u4 is defined
Needed in order to work with Arduino Leonardo
2013-04-18 00:15:06 +02:00
Kristian Sloth Lauszus
72ec50717d Removed call to analogPinToChannel for Leonardo 2013-04-18 00:07:33 +02:00
Kristian Sloth Lauszus
938351bcae Use analogPinToChannel if it's defined 2013-04-17 19:49:40 +02:00
Kristian Sloth Lauszus
be9462e41e Added support for all variants of Sanguino 2013-04-04 20:55:15 +02:00
Cristian Maglie
b59784d50c Fix deprecated ISR names for ATmega8.
See #881
2013-03-29 15:17:54 +01:00
Cristian Maglie
f88c9847ac Removed deprecated interrupt handlers
Fixes #831 #881 #955 #1123 #1140
2013-03-29 14:41:36 +01:00
Cristian Maglie
d88236a033 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
Cristian Maglie
a4c2062405 Backported malloc and realloc from avr-libc 1.8.0 (without test code)
See #857
2013-03-23 21:40:52 +01:00
David A. Mellis
ebc35019be Use analogPinToChannel() macro if present for ATtiny25/45/85.
This allows use of A0, A1, A2, A3 constants and for them to be mapped to the appropriate analog input channel. It should only be used if the macro is actually defined.
2013-03-06 17:49:44 -05:00
Cristian Maglie
141684d410 Add trivial new[] and delete[] operators (Justin R. Cutler)
Fixes #73
Fixes #883
2012-12-16 14:30:12 +01:00
Cristian Maglie
d457332664 Fixed malloc() bug. (Paul Stoffregen)
Fixes #857
2012-12-16 14:16:35 +01:00
Cristian Maglie
948a5c89e4 Added support for Arduino Esplora 2012-12-07 18:11:07 +01:00
David A. Mellis
0e0715abd3 Clarifying comment. 2012-11-29 13:55:59 -05:00
David A. Mellis
e7a31301e5 Moving TXCO definition into HardwareSerial.cpp from HardwareSerial.h.
Otherwise, you get an error when compiling for processors with no serial port because the header file is always compiled.

See, for an example of the problem: https://github.com/damellis/attiny/issues/8
2012-11-29 13:48:01 -05:00
David A. Mellis
036f0465e5 HardwareSerial: change byte to uint8_t (since byte definition isn't present). 2012-11-02 09:24:51 -04:00
David A. Mellis
f689991a59 Adding LilyPad Arduino USB. 2012-11-01 10:45:50 -04:00