Age | Commit message (Collapse) | Author |
|
Replaced direct register manipulation with calls to bitWrite(). Fixed TIMSK5 usage on Leonardo (as well as some other preprocessor statements).
|
|
Rebased the bugfix from the original Google Code issue #292 to work with Arduino 1.6.x
Description of original fix provided by Pete62:
The later 8 bit AVR's use two registers (TCCRxA, TCCRxB) whereas the ATmega8 only uses a single register (TCCR2) to house the control bits for Timer 2. Bits were inadvertently being cleared.
|
|
let's not expose it until the API is not accepted
widely by the dev mailing list
|
|
PR #2696 without timeout-related changes
|
|
Fixes #2538
|
|
Fixes #2151
Fixes #2147
|
|
Conflicts:
hardware/arduino/cores/arduino/HardwareSerial.cpp
hardware/arduino/cores/robot/Arduino.h
|
|
This reverts commit f40e4713542fa862d5b99b256a642e001a796988.
Added an hint for the buffer sizes.
See #2057
Fixes #2367
|
|
Fixes #2379
|
|
|
|
|
|
Close #1847
|
|
String index fixes and cleanups
|
|
When checking the `left` argument, it previously allowed having
left == len. However, this means the substring starts one past the last
character in the string and should return the empty string. In practice,
this already worked correctly, because buffer[len] contains the trailing
nul, so it would (re)assign the empty string to `out`.
However, fixing this check makes it a bit more logical, and prevents a
fairly unlikely out-of-buffer write (to address 0x0) when calling
substring on an invalidated String:
String bar = (char*)NULL;
bar.substring(0, 0);
|
|
Fix for upload problems on Arduino Leonardo (and derivatives) on OSX 10.9
|
|
Previously, this method calculated the length of the string from the
given index onwards. However, the other remove() method called already
contains code for this calculation, which is used when the count passed
in is too big. This means we can just pass in a very big count that is
guaranteed to point past the end of the string, shrinking the remove
method by a few bytes.
|
|
Previously, if you passed in a very big index and/or count, the
`index + count` could overflow, making the count be used as-is instead
of being truncated (causing the string to be updated wrongly and
potentially writing to arbitrary memory locations).
We can rewrite the comparison to use `len - index` instead. Since we
know that index < len, we are sure this subtraction does not overflow,
regardless of what values of index and count we pass in.
As an added bonus, the `len - index` value already needed be calculated
inside the if, so this saves a few instructions in the generated code.
To illustrate this problem, consider this code:
String foo = "foo";
Serial.println(foo.length()); // Prints 3
foo.remove(1, 65535); // Should remove all but first character
Serial.println(foo.length()); // Prints 4 without this patch
Not shown in this is example is that some arbitrary memory is written
as well.
|
|
This check already happens in the remove(unsigned int, unsigned int)
method that is caled, so there is no need to also check this here.
|
|
|
|
The following empty stubs has been replaced by the gcc
flag -fno-threadsafe-static:
int __cxa_guard_acquire(__guard *);
void __cxa_guard_release (__guard *);
void __cxa_guard_abort (__guard *);
The following empty stubs has been moved into their specific
module abi.cpp:
void __cxa_pure_virtual(void) __attribute ((noreturn));
void __cxa_deleted_virtual(void) __attribute ((noreturn));
Fix #107
|
|
Probalby new.h may be removed completely.
|
|
|
|
|
|
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
|
|
|
|
Fix of a bug #2199
|
|
|
|
Fix two compiler warnings generated by updated toolchain
|
|
|
|
Stream::find(char *target) passes an empty terminator string to
Stream::findUntil(char *target, char *terminator) which caused a compiler
warning with the updated toolchain, so cast it to a char*.
|
|
github.com:matthijskooijman/Arduino into matthijskooijman-ide-1.5.x-timer-variant
|
|
See #2080 for more details.
|
|
|
|
These chips were previously supported, but since parity error checking
was added, this support has broken. Most chips define UPE0 (etc.) for
the parity error bit. Some chips don't have numbered UARTS so only
define UPE and even fewer define PE instead of UPE. This adds support
for those chips again.
Closes: #2137
|
|
See #2080 and #2139.
|
|
|
|
See #2080
|
|
|
|
See:
https://github.com/arduino/Arduino/commit/9ac7e30252fce5b9dafde3288519b020b73c37bd#commitcomment-6718676
|
|
|
|
Fixes bug where Serial.read() would always return 0 as the first byte.
|
|
Fix of a bug in Stream.cpp
|
|
|
|
See #1953
|
|
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));
}
|
|
|
|
Read CDC data from USB FIFO on demand instead of in ISR.
Remove superfluous ring buffer.
Signed-off-by: Paul Brook <paul@nowt.org>
|
|
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>
|
|
|
|
Close #1951
|