Commit Graph

1409 Commits

Author SHA1 Message Date
Nico 2e90af7ab6 RX and TX Serial buffer sizes can now be defined independently
Fixes #2597
2015-05-12 15:09:48 +02:00
Arnav Gupta b682456e8e saveHex: rename recipe.hex -> recipe.output
Signed-off-by: Arnav Gupta <championswimmer@gmail.com>
2015-05-07 11:57:12 +02:00
Arnav Gupta 8d9613bc95 update Sketch menu, add Save hex option
* Moving Upload options from "File" menu to "Sketch" menu as those
     are sketch actions more than file actions.

Signed-off-by: Arnav Gupta <championswimmer@gmail.com>
2015-05-07 11:57:12 +02:00
Federico Fissore 05245b7a6f AVR core version bump 2015-05-06 16:24:13 +02:00
Cristian Maglie bb40f4d1af [gemma] Integration of Gemma board 2015-05-06 15:55:56 +02:00
Federico Fissore e78dba9b34 Disabling uncertified warning, leaving vids/pids 2015-04-27 10:55:16 +02:00
Federico Fissore d2908e1116 Renamed compiler.warning_flags pref to compiler.warning_level
Provided a default value for compiler.warning_flags
Releasing avr core 1.6.5
2015-04-24 09:27:28 +02:00
Federico Fissore 0f1ef3679f AVR: upgrading avr core version 2015-04-23 11:10:17 +02:00
Cristian Maglie ad7ede5647 Fixed indentation in Stream.cpp, no code change 2015-04-21 18:10:32 +02:00
Cristian Maglie 9e2fdcc8f4 Fixed wrong bracket placement (see #3011) 2015-04-21 18:07:42 +02:00
Kristian Sloth Lauszus 82eb5692c6 Fixed: warning: comparison between signed and unsigned integer expressions 2015-04-21 00:08:11 +02:00
Kristian Sloth Lauszus 2398ef5260 Fixed: warning: suggest explicit braces to avoid ambiguous 'else' 2015-04-21 00:08:02 +02:00
Federico Fissore f3a5d45c3a Merge pull request #2973 from ffissore/warnings
Reviewed warnings key names and dropdown in Preferences
2015-04-17 23:55:54 +02:00
Martino Facchin 6cbf4db4b6 Merge branch 'jipp-master' 2015-04-14 10:13:58 +02:00
Martino Facchin 2dada5abb8 Merge pull request #2961 from jan-r/issue292-fix
Tone: fix for ATmega8
2015-04-14 08:36:12 +01:00
Jan d27eb7e1c1 Fix for issue #292
Replaced direct register manipulation with calls to bitWrite(). Fixed TIMSK5 usage on Leonardo (as well as some other preprocessor statements).
2015-04-13 20:36:28 +02:00
Federico Fissore e89f3d5773 Reviewed warnings key names and dropdown in Preferences 2015-04-13 17:18:23 +02:00
jipp 7e5b5bfcb5 Update Tone.cpp
Tone.cpp stops compile when TCCR0A/TCCR0B defined and WGM01 not defined #2923
2015-04-13 16:18:18 +02:00
Federico Fissore 0d3ba46b48 Better preference for setting warnings level. See 61592d78fa (commitcomment-10668365) 2015-04-13 12:22:37 +02:00
Jan 331f5c832e Update Tone.cpp
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.
2015-04-11 00:15:58 +02:00
Federico Fissore cf6b1559cf Platform.txt in-memory rewrite rules: whenever loaded, if a property is set to a value known to be wrong/old, that property is replaced with the current/right value.
This happens in-memory, no platform.txt file were harmed during rewriting
Mitigate #2838
2015-03-30 16:18:08 +02:00
Federico Fissore 43b2b1f660 Starting 1.6.3
Updated toolchains: linux statically compiled, added gcc lto plugin (disabled)
2015-03-30 15:06:59 +02:00
Federico Fissore da5830c4bf LibraryManager: better type filtering 2015-03-27 14:51:19 +01:00
Federico Fissore 1aba03acca Not using gcc version, hard to maintain 2015-03-27 14:51:15 +01:00
Federico Fissore 40a625b4ff avr platform: fixed avrdude path 2015-03-27 14:51:12 +01:00
Federico Fissore 37bf5817af Fixed platforms(.txt) 2015-03-27 14:51:12 +01:00
Martino Facchin deff3bf628 Stream: set findMulti function as protected
let's not expose it until the API is not accepted
widely by the dev mailing list
2015-03-24 17:13:14 +01:00
Martino Facchin 6ae8a700f3 Merge pull request #2814 from facchinm/test_pr2696
Fix findUntil in Stream library
2015-03-24 15:24:42 +00:00
Jim Leonard (Xuth) 8504a809dd Fix findUntil in Stream library
PR #2696 without timeout-related changes
2015-03-24 12:31:50 +01:00
Martino Facchin f2debfa255 Merge pull request #2812 from facchinm/test_pr2794
EEPROM library V2
2015-03-24 09:24:00 +00:00
Martino Facchin d8656b8c52 EEPROM: examples: fix Serial for board Leonardo 2015-03-24 10:20:00 +01:00
Chris--A 5da9792cd6 Fixed EEPROM examples and added readme 2015-03-24 13:58:01 +10:00
Chris--A 26577474ef Updated EEPROM examples.
Removed hard coded lengths, which were incorrect for standard Arduino's
now.
2015-03-20 12:06:20 +10:00
Chris--A fd4323f360 Small tweaks to EEPROM lib and examples. 2015-03-19 17:13:32 +10:00
Victor Aprea 8fcf5c9406 Do not influence state of SS if it's already been set to an output previously, e.g. by user sketch
squashes and closes PR #2659
2015-03-18 10:37:40 +01:00
Chris--A c9ec4eabda Updated EEPROM storage class
To avoid having a .cpp just for an extern variable definition, `static`
has been chosen over `extern`.

As the `EEPROMClass` class simply wraps functionality located elsewhere,
it is completely compiled away. Even though each translation unit which
includes the header will get a copy with internal linkage, there is no
associated overhead.

More info
[here](http://stackoverflow.com/questions/29098518/extern-variable-only-in-header-unexpectedly-working-why)
2015-03-18 18:56:08 +10:00
Chris--A dd1ec9920b Added additional examples to EEPROM lib 2015-03-17 17:17:08 +10:00
Chris--A 46e810cf07 Added new version of EEPROM library. 2015-03-17 17:13:47 +10:00
Federico Fissore 1da3da02ff Started working on 1.6.2 2015-03-11 11:42:55 +01:00
Federico Fissore d3e03f0381 Added warning for uncertified boards 2015-03-10 08:52:41 +01:00
Martino Facchin 6b396732ca Merge branch 'ide-1.5.x' into SoftwareSerial 2015-03-05 12:33:35 +01:00
Martino Facchin 97fb130175 SoftwareSerial: match bool API with HardwareSerial 2015-03-05 12:30:01 +01:00
Cristian Maglie 5cbfcfbf07 Update revision log. Version set to 1.6.1. 2015-02-19 18:22:43 +01:00
Cristian Maglie 2aef2cb108 "objcopy" recipes are no more tied to "hex" extension
This allow to define specific recipes for every platform
but keeps backward compatibility.

See #2614
2015-02-16 14:39:55 +01:00
Arnav Gupta 772b40df74 rename hex -> output
using generic term 'output', because for samx32,
output is .bin format and not .hex

Signed-off-by: Arnav Gupta <championswimmer@gmail.com>
2015-02-10 04:31:51 +05:30
Cristian Maglie 17ad4fe5ef Corrected some email contacts. 2015-02-05 16:47:22 +01:00
Matthijs Kooijman 230f987ba6 Prevent low pulse on TX initialization in SoftwareSerial
Previously, the TX pin would be set to output first and then written
high (assuming non-inverted logic). When the pin was previously
configured for input without pullup (which is normal reset state), this
results in driving the pin low for a short when initializing. This could
accidenttally be seen as a stop bit by the receiving side.

By first writing HIGH and then setting the mode to OUTPUT, the pin will
have its pullup enabled for a short while, which is harmless.
2015-01-26 17:04:26 +01:00
Matthijs Kooijman 827c349a17 Remove unneeded #ifdef in SoftwareSerial
The debugPulse function definition already checks for _DEBUG, resulting
in an empty function definiton and the function call being optimized
away.
2015-01-26 17:03:25 +01:00
Matthijs Kooijman 0a6072dccb Fix SoftwareSerial timings
Instead of using a lookup table with (wrong) timings, this calculates
the timings in SoftwareSerial::begin. This is probably a bit slower, but
since it typically happens once, this shouldn't be a problem.
Additionally, since the lookup tables can be removed, this is also a lot
smaller, as well as supporting arbitrary CPU speeds and baudrates,
instead of the limited set that was defined before.

Furthermore, this switches to use the _delay_loop_2 function from
avr-libc instead of a handcoded delay function. The avr-libc function
only takes two instructions, as opposed to four instructions for the old
one. The compiler also inlines the avr-libc function, which makes the
timings more reliable.

The calculated timings directly rely on the instructions generated by
the compiler, since a significant amount of time is spent processing
(compared to the delays, especially at higher speeds). This means that
if the code is changed, or a different compiler is used, the
calculations might need changing (though a few cycles more or less
shouldn't cause immediate breakage).

The timings in the code have been calculated from the assembly generated
by gcc 4.8.2 and gcc 4.3.2.

The RX baudrates supported by SoftwareSerial are still not unlimited. At
16Mhz, using gcc 4.8.2, everything up to 115200 works. At 8Mhz, it works
up to 57600. Using gcc 4.3.2, it also works up to 57600 at 16Mhz and up
to 38400 at 8Mhz. Note that at these highest speeds, communication
works, but is still quite sensitive to other interrupts (like the
millis() interrupts) when bytes are sent back-to-back, so there still
are corrupted bytes in RX.

TX works up to 115200 for all combinations of compiler and clock rates.

This fixes #2019
2015-01-26 17:03:25 +01:00
Matthijs Kooijman 08c3bfdc9f Disable the RX PCINT inside SoftwareSerial::recv
Before, the interrupt would remain enabled during reception, which would
re-set the PCINT flag because of the level changes inside the received
byte. Because interrupts are globally disabled, this would not
immediately trigger an interrupt, but the flag would be remembered to
trigger another PCINT interrupt immediately after the first one is
processed.

Typically this was not a problem, because the second interrupt would see
the stop bit, or an idle line, and decide that the interrupt triggered
for someone else. However, at high baud rates, this could cause the
next interrupt for the real start bit to be delayed so much that the
byte got corrupted.

By clearing the interrupt mask bit for just the RX pin (as opposed to
the PCINT mask bit for the entire port), any PCINT events on other bits
can still set the PCINT flag and be processed as normal. In this case,
it's likely that there will be corruption, but that's inevitable when
(other) interrupts happen during SoftwareSerial reception.
2015-01-26 17:03:25 +01:00