1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-16 11:21:18 +03:00
Commit Graph

1341 Commits

Author SHA1 Message Date
370648a532 Merge branch 'ide-1.5.7' into ide-1.5.x 2014-06-27 13:44:18 +02:00
10a89a1d8d Support Atmega8 (and similar that define PE instead of UPE) again
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
2014-06-25 17:20:07 +02:00
4014dd6070 Allow variants to define an initVariant() function that is called at startup.
See #2080 and #2139.
2014-06-25 16:56:19 +02:00
c2e5f67ea6 Updated arm gcc to version 4.8.3-2014q1 2014-06-25 11:59:47 +02:00
4df2c8982a Updated arm gcc to 4.8.3 2014-06-25 11:57:49 +02:00
3a4381955e Updated arm gcc to 4.7.4 2014-06-25 11:56:50 +02:00
59767b4c03 Removed patch for old malloc bug (no more useful with updated toolchain) 2014-06-25 10:14:35 +02:00
b72f461b4c Fixed compilation error when targetting Mega. Error is caused by #2039 and this fix is just a workaround 2014-06-25 10:14:35 +02:00
6f74581bba gcc: Adding -w flag to compiler.c.elf.flags in order to avoid printing ISR warning http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59396 2014-06-25 10:14:35 +02:00
44a6cbf2de Enabling link-time optimization. See #660 2014-06-25 10:14:34 +02:00
5a015b3eec New common AVR toolchain 2014-06-25 10:12:39 +02:00
40270306e0 Allow variants to define an initVariant() function that is called at startup.
See #2080
2014-06-19 19:49:47 +02:00
1a305cdc45 Merge branch 'master' into ide-1.5.x 2014-06-19 17:01:53 +02:00
11e02db954 Fixed regression in USBAPI and CDC (xaljox)
See:
9ac7e30252 (commitcomment-6718676)
2014-06-19 16:52:48 +02:00
7f9e9b1cc2 Merge branch 'master' into HEAD 2014-06-13 10:29:12 +02:00
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
d460dd6683 corrected wrong path to firmware binaries in wifishield upgrade script for mac 2014-06-08 00:01:40 +02:00
1918966aef Merge pull request #2104 from amulya349/master
Fix of a bug in Stream.cpp
2014-06-02 10:37:37 +02:00
82fe44d76d Merge branch 'master' into HEAD 2014-05-30 10:54:14 +02:00
6914af0d63 USB CDC available() method returns correct number of bytes in buffer.
See #1953
2014-05-30 10:46:46 +02:00
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
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
36331fa1c9 Merge branch 'usbcdc-improved' into ide-1.5.x 2014-05-26 13:38:07 +02:00
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
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
b822091a78 improved USB write speeds 2014-05-24 00:34:56 +02:00
44b5096e05 Backported Print class from ide-1.5.x branch
Close #1951
2014-05-24 00:13:07 +02:00
cc2a9a65c3 Merge branch 'ide-1.5.x-hwserial-cleanup' of github.com:matthijskooijman/Arduino into matthijskooijman-ide-1.5.x-hwserial-cleanup 2014-05-23 21:16:42 +02:00
5d92c1ba8e Merge remote-tracking branch 'arduino/master' into ide-1.5.x
Conflicts:
	build/shared/examples/01.Basics/Blink/Blink.ino
	build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino
	build/shared/examples/10.StarterKit/p02_SpaceshipInterface/p02_SpaceshipInterface.ino
	hardware/arduino/cores/arduino/HardwareSerial.cpp
2014-05-23 21:04:47 +02:00
e079baa18d Fix for Due Wire library
Fix reading and use of TWI status register.
Also, update endTransmission to be compatible with original & give more
useful return.
2014-05-23 12:06:43 +02:00
02135349a9 Support TIMER1C
Some devices, such as the atmega2560 or the atmega256rfr2 have a timer1c
output. It seems this output is not connected to anything on the Arduino
Mega, but this allows using it on third party hardware nonetheless.
2014-05-16 18:57:04 +02:00
f40e471354 Match return value to type in available() 2014-05-07 17:39:08 -07:00
b26db209cd Remove unneeded register and ISR names in HardwareSerialx.cpp
Before, HardwareSerial1+.cpp were a copy of HardwareSerial1.cpp with all
0's replaced by the corresponding number. This would mean that e.g.
the Serial1 object would use the UBRRL register instead of UBRR1L when
it was defined, or the USART_RX_vect instead of USART1_RX_vect.

In practice, this would neve actually cause problems, since:
 - No avr chip currently has both the non-numbered registers as well as
   numbered registers.
 - HardwareSerial.h would only define HAVE_HWSERIALx when the
   corresponding numbered register is defined (except for
   HAVE_HWSERIAL0, which is also defined when the unnumbered registers
   are present).

Furthermore, before both the UARTx_xx_vect and USART_x_xx_vect was used.
Looking at the include files, only UART1_xx_vect is actually used (by
iom161.h), the others use USARTx_xx_vect. For this reason,
HardwareSerial1.cpp keeps the preprocessor conditional to select either
UART or USART and the other files use USART unconditionally.

While we're here, also fix the compiler error message when no valid ISR
name was found (it previously said "for the first UART" in all cases).
2014-05-06 10:26:46 +02:00
0bc4b4bad1 Fix comment typo 2014-05-06 10:19:08 +02:00
412bfd6cf9 Fix EXTERNAL_NUM_INTERRUPTS for atmega128rfa1 and atmega256rfr2 2014-05-02 12:50:07 +02:00
f864cdcff2 Fixed other trivial warnings in AVR USB core.
See #1877
2014-04-20 23:08:55 +02:00
3d795c374b Removed other unused variables in CDC.cpp and HID.cpp
See #1877
2014-04-20 20:56:51 +02:00
abbebed7dd Removed 'USB_MANUFACTURER' constant redefinition for known VIDs.
See #1877
2014-04-20 20:49:04 +02:00
b673b72cfb Merge branch 'ide-1.5.x-warnings' of github.com:matthijskooijman/Arduino into ide-1.5.x 2014-04-20 19:36:29 +02:00
f0738fdf9f Merge branch 'ide-1.5.x_serial_config' of github.com:bluesign2k/Arduino into ide-1.5.x 2014-04-10 21:55:29 +02:00
b0e29179a5 Added extra flags support through platform.local.txt on sam
See #1985
2014-04-10 21:47:09 +02:00
a89f5e68cf Explicitly define compiler.path in avr/platform.txt
Previously, this relied on an (ugly, avr-specific) magic default for the
compiler.path variable, set by the IDE. This allowed the IDE to fall
back to a system-wide toolchain when no bundled toolchain was found (by
making compiler.path empty).

However,
 - this only worked for avr, not sam,
 - this worked only for gcc, a system-wide avrdude would break on the
   avrdude.conf path in platform.txt, and

This would mean that automatic system-wide fallback didn't work in all
situations, so you'd still have to modify platform.txt (or create
platform.local.txt). Since doing that explictly is the most reliable
way, this commit removes the partial-working ability to do this
automatically.

Note that the code to automatically set compiler.path is still kept
around, in case third-party hardware still relies on this. At some
point, this code should be removed, but for now it just shows a warning
message.
2014-04-10 12:19:43 +02:00
d02fde6e37 Add config options to due Serial1, 2, and 3
Adds ability to set length, parity and stop bit configuration to
hardware serial ports using USART module (Serial1, Serial2, and Serial
3) on Due to allow compatibility with avr devices.
2014-04-07 21:55:23 +01:00
d2ec05611c Add (empty) compiler.*.extra_flags variables in platform.txt
These make it easier for a user to add extra compiler flags in a
platform.local.txt file.
2014-04-04 11:31:50 +02:00
710e4fb7b8 Merge commit '1ad74' into ide-1.5.x 2014-04-01 17:19:54 +02:00
1ad74ce09b Use correct type for index calculation in HardwareSerial 2014-04-01 17:18:02 +02:00
77187ad4e4 I forgot a file 2014-04-01 16:14:16 +02:00
8a1fffdb8e Import WString from 1.5.6 2014-04-01 14:46:13 +01:00
5bc28a178f Fixed string constructor overloading bug 2014-04-01 14:02:17 +01:00
c734246c46 Fix typo in SerialEvent3 handling
In commit 0e97bcb (Put each HardwareSerial instance in its own .cpp
file), the serial event handling was changed. This was probably a
copy-paste typo.

The effect of this bug was that SerialEvent3 would not run, unless
SerialEvent2 was defined, but also that if SerialEvent2 is defined but
SerialEvent3 is not, this could cause a reset (call to NULL pointer).

This closes #1967, thanks to Peter Olson for finding the bug and fix.
2014-03-27 19:20:54 +01:00