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
Cristian Maglie
540743129b
Merge branch 'ide-1.5.x' into dev-ide-1.5.x-discovery
...
Conflicts:
app/src/processing/app/Preferences.java
app/src/processing/app/debug/Uploader.java
2013-08-23 15:59:24 +02:00
Cristian Maglie
b3348a6706
Removed unused flags from String (free 1 byte of SRAM)
2013-08-20 15:15:47 +02:00
Cristian Maglie
023434a6be
Merge branch 'master' into ide-1.5.x
2013-07-31 17:33:55 +02:00
Cristian Maglie
40b622a5d1
Merge branch 'issue1366' of github.com:Lauszus/Arduino into Lauszus-issue1366
2013-07-31 17:22:12 +02:00
Cristian Maglie
acb3df6d43
Merge branch 'ide-1.5.x' into dev-ide-1.5.x-discovery
...
Conflicts:
hardware/arduino/avr/cores/arduino/USBCore.cpp
2013-07-30 10:45:44 +02:00
Cristian Maglie
4de497b725
Move buffers into USB CDC (look #947 and #1369 for reference)
2013-07-27 12:06:42 +02:00
Cristian Maglie
090d53a74e
Fixed compile problem for Leonardo after 0bd6a2d20fb9664255b20e0db11dd4586ebe9007
2013-07-26 12:50:17 +02:00
Matthijs Kooijman
d1da7ef303
Make private members of HardwareSerial protected
...
This allows users to create subclasses.
Closes : #947
2013-07-26 12:41:35 +02:00
Matthijs Kooijman
714874dd8c
Move buffers into HardwareSerial
...
This removes the need for doing an extra pointer dereference on every
access to the buffers, shrinking the code by around 100 bytes.
The members for these buffers must be public for now, since the
interrupt handlers also need to access them. These can later be made
private again.
Furthermore, the struct ring_buffer was removed. This allows the all
head and tail pointers to be put into the HardwareSerial struct before
the actual buffers, so the pointers all end up in the first 32 bytes of
the struct that can be accessed using a single instruction (ldd).
References: #947
2013-07-26 12:39:56 +02:00
Matthijs Kooijman
a056282246
Use uint8_t for HardwareSerial ringbuffer pointers
...
Since the buffers aren't bigger than 64 bytes, these values can be
smaller. This saves a few bytes of ram, but also saves around 50 bytes
of program space, since the values can now be loaded using a single
instruction.
To prevent problems when people manually increase the buffer size, a
compile-time check is added.
Closes : #1078
2013-07-26 12:18:56 +02:00
Angus Gratton
ff47a782f5
Remove hardcoded product names (all provided for in boards.txt)
2013-07-17 14:38:05 +02:00
Angus Gratton
0340b90366
Fix whitespace (tabify), oops
2013-07-17 14:37:49 +02:00
Angus Gratton
a33cba585f
Allow USB product and manufacturer strings to be supplied in boards.txt
2013-07-17 14:37:29 +02:00
Cristian Maglie
d1db9d9810
Refactored YunClient and YunServer classes.
...
Added YunClient.connect() methods.
2013-07-04 17:15:52 +02:00
Federico Fissore
737ab5164d
Merge remote-tracking branch 'arduino/ide-1.5.x' into dev-ide-1.5.x-discovery
2013-06-28 15:36:50 +02:00
Cristian Maglie
620fe0a3ac
String: fixed number of whitespaces in concat() methods
2013-06-28 09:53:25 +02:00
Federico Fissore
da361cac0d
Merge remote-tracking branch 'arduino/ide-1.5.x' into ide-1.5.x-discovery
2013-06-25 16:13:56 +02:00
Cristian Maglie
a7ba61d1b7
String: changed default to 2 decimal digits
2013-06-21 21:23:12 +02:00
Cristian Maglie
514b18bb05
Merge branch 'ide-1.5.x' into ide-1.5.x-discovery
2013-06-07 00:38:42 +02:00
Cristian Maglie
f25e5e94f7
Fixed buffer overflow on String class (Paul Stoffregen)
2013-06-06 20:04:43 +02:00
Cristian Maglie
550b6adcfc
Merged various bugfix / improvements to String class.
...
Merge branch 'master' into ide-1.5.x
2013-06-06 19:54:58 +02:00
Cristian Maglie
db286ac0c1
Added support for Flash string on String class.
2013-06-06 16:33:20 +02:00
Cristian Maglie
2719777a48
String class: removed deep copy on substring method.
...
Small code cleanup.
2013-06-06 16:33:20 +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
177ad96f86
Merge branch 'merge-1.0.5' into ide-1.5.x-discovery
2013-06-01 23:16:02 +02:00
Cristian Maglie
d90fcca583
Merged 1.0.5
2013-05-29 18:30:36 +02:00
Federico Fissore
5ab307f06f
Etheris references renamed Yun without accent to avoid encoding issues
2013-05-23 09:53:56 +02:00
Federico Fissore
09749bdf01
right etheris values
2013-05-16 15:37:42 +02:00
Fede85
cc5f2a52b4
Added support to INT6 on Leonardo.
...
Fixes #988
2013-05-13 21:22:59 +02:00
Cristian Maglie
7207108255
Merged 1.0.5
...
Still missing:
- updates to WiFi lib for sam.
- updates to examples of Ehternet and WiFi for sam.
Merge remote-tracking branch 'arduino/master' into ide-1.5.x
Conflicts:
app/src/processing/app/Base.java
app/src/processing/app/Editor.java
app/src/processing/app/helpers/FileUtils.java
app/src/processing/app/i18n/Resources_fr.po
app/src/processing/app/i18n/Resources_fr.properties
build/shared/revisions.txt
hardware/arduino/avr/libraries/Ethernet/examples/DnsWebClient/DnsWebClient.ino
hardware/arduino/avr/libraries/WiFi/examples/WifiChatServer/WifiChatServer.ino
hardware/arduino/avr/libraries/WiFi/examples/WifiPachubeClient/WifiPachubeClient.ino
hardware/arduino/avr/libraries/WiFi/examples/WifiPachubeClientString/WifiPachubeClientString.ino
hardware/arduino/avr/libraries/WiFi/examples/WifiTwitterClient/WifiTwitterClient.ino
hardware/arduino/avr/libraries/WiFi/examples/WifiUdpSendReceiveString/WifiUdpSendReceiveString.ino
hardware/arduino/avr/libraries/WiFi/examples/WifiWebClient/WifiWebClient.ino
hardware/arduino/avr/libraries/WiFi/examples/WifiWebClientRepeating/WifiWebClientRepeating.ino
hardware/arduino/avr/libraries/WiFi/examples/WifiWebServer/WifiWebServer.ino
libraries/WiFi/examples/WiFiChatServer/WiFiChatServer.ino
libraries/WiFi/examples/WiFiPachubeClient/WiFiPachubeClient.ino
libraries/WiFi/examples/WiFiPachubeClientString/WiFiPachubeClientString.ino
libraries/WiFi/examples/WiFiTwitterClient/WiFiTwitterClient.ino
libraries/WiFi/examples/WiFiUdpSendReceiveString/WiFiUdpSendReceiveString.ino
libraries/WiFi/examples/WiFiWebClient/WiFiWebClient.ino
libraries/WiFi/examples/WiFiWebClientRepeating/WiFiWebClientRepeating.ino
libraries/WiFi/examples/WiFiWebServer/WiFiWebServer.ino
libraries/WiFi/examples/WifiChatServer/WifiChatServer.ino
libraries/WiFi/examples/WifiPachubeClient/WifiPachubeClient.ino
libraries/WiFi/examples/WifiPachubeClientString/WifiPachubeClientString.ino
libraries/WiFi/examples/WifiTwitterClient/WifiTwitterClient.ino
libraries/WiFi/examples/WifiUdpSendReceiveString/WifiUdpSendReceiveString.ino
libraries/WiFi/examples/WifiWebClient/WifiWebClient.ino
libraries/WiFi/examples/WifiWebClientRepeating/WifiWebClientRepeating.ino
libraries/WiFi/examples/WifiWebServer/WifiWebServer.ino
2013-05-11 14:37:25 +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
ee90e68e86
Merged 1.0.5
...
Merge remote-tracking branch 'arduino/master' into ide-1.5.x
Conflicts:
app/src/processing/app/Base.java
build/shared/revisions.txt
hardware/arduino/avr/cores/arduino/malloc.c
hardware/arduino/cores/arduino/avr-libc/malloc.c
hardware/arduino/cores/arduino/malloc.c
todo.txt
2013-04-03 13:51:04 +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
Cristian Maglie
f567db7573
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
aa218e803a
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
5f4e55a3d2
Merged 1.0.4 pre-release into 1.5
2012-12-17 16:53:45 +01:00
Cristian Maglie
09b755fb9c
Add trivial new[] and delete[] operators (Justin R. Cutler)
...
Fixes #73
Fixes #883
2012-12-16 14:30:12 +01:00
Cristian Maglie
025ec2bc84
Fixed malloc() bug. (Paul Stoffregen)
...
Fixes #857
2012-12-16 14:16:35 +01:00
Cristian Maglie
433090f18b
Merged 1.0.3
2012-12-10 15:55:05 +01:00
Federico Fissore
c453e0a32e
fixed permissions on a lot of text files. see #1116
2012-12-10 10:42:49 +01:00
David A. Mellis
c4337d812b
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-12-08 10:44:48 -05:00
Cristian Maglie
1668039101
Added support for Arduino Esplora
2012-12-07 18:11:07 +01:00
David A. Mellis
9d638ca052
Clarifying comment.
2012-11-29 13:55:59 -05:00
David A. Mellis
4a01b84cab
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
Cristian Maglie
706f5c74b2
Merged 1.0.2
...
Merge remote-tracking branch 'arduino/master' into ide-1.5.x
Conflicts:
app/src/processing/app/debug/AvrdudeUploader.java
build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino
build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino
build/shared/examples/09.USB/Keyboard/KeyboardSerial/KeyboardSerial.ino
build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino
build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino
hardware/arduino/boards.txt
2012-11-04 22:49:14 +01:00
Cristian Maglie
69aead513d
Added general yield()-hook for cooperative scheduling development (part 2)
2012-11-02 18:12:21 +01:00
David A. Mellis
769aab0115
HardwareSerial: change byte to uint8_t (since byte definition isn't present).
2012-11-02 09:24:51 -04:00
David A. Mellis
cfec7864e9
Adding LilyPad Arduino USB.
2012-11-01 10:45:50 -04:00
Cristian Maglie
6e2b0e8755
Added general yield()-hook for cooperative scheduling development
2012-10-31 01:37:37 +01:00
David A. Mellis
42ca56fb83
Adding Micro.
2012-10-27 14:12:26 -04:00
David A. Mellis
69fa44473b
Updating USB core to work at 8 MHz (different PLLCSR value).
2012-10-18 15:03:23 -04:00
Cristian Maglie
037020e938
Merged latest changes in AVR arduino core
2012-10-18 18:47:50 +02:00
Cristian Maglie
6a45ba48ab
Merged upstream arduino branch
2012-10-18 15:50:09 +02:00
David A. Mellis
6d296e0fab
Adding ATmega644P check to ATmega1284P check.
2012-10-09 13:53:09 -04:00
David A. Mellis
1a0f22225b
Moving ATmega32U4 Timer 2 #undef's to Leonardo pins_arduino.h file.
2012-09-13 09:19:52 -04:00
David A. Mellis
999619579b
Merge pull request #102 from sgk/leonardoTone
...
Fix for tone() on Leonardo.
2012-09-13 06:07:10 -07:00
Peter Van Hoyweghen
dc86d26a11
Avoid serial buffer overrun on leonardo
2012-09-13 08:46:45 -04:00
David A. Mellis
5ca747e312
Changing setting of the UMSELn bits (for UART mode) and serial config values.
...
Before, the UMSELn1 bit was being to set to 1, putting the UART into a reserved mode. Now, we only set the high (0x80) bit to 1 for the ATmega8, which is needed to access UCSRnC (whose i/o address is shared with UBRRH).
Also, no longer bitwise-or the new config with the existing register value, because we're actually configuring all the settings in the register. (We're not using UCPOL, but it's supposed to be 0 in asynchronous mode.)
2012-08-30 08:47:35 -04:00
David A. Mellis
1650169f5d
Renaming serial config constants to, e.g., SERIAL_8N1.
2012-08-30 08:21:12 -04:00
David A. Mellis
6542625bc2
Merge pull request #109 from Alarus/master
...
Serial.begin() parameter to set data bits, parity, stop bits.
2012-08-30 05:08:28 -07:00
David A. Mellis
70b6f11d63
Fixing Serial.flush() breakage on Leonardo (WestFW).
...
http://code.google.com/p/arduino/issues/detail?id=1020
2012-08-30 07:44:25 -04:00
David A. Mellis
912092b03f
Fixing ATmega8 breakage from flush() change. (WestFW)
...
http://code.google.com/p/arduino/issues/detail?id=1019
2012-08-29 20:52:30 -04:00
David A. Mellis
c29b408a9d
Adding overloads so Serial.write(0) works.
...
http://code.google.com/p/arduino/issues/detail?id=1006
2012-08-29 16:32:05 -04:00
David A. Mellis
00ab72619e
Serial.flush() waits for last character to be transmitted (michele.mazzucchi)
...
http://code.google.com/p/arduino/issues/detail?id=871
2012-08-28 08:02:54 -04:00
Adam Dunlap
c40ab91c41
Fix issue 866
...
Fix issue 866 by adding a const qualifier to what the F macro casts to.
2012-08-16 20:59:33 -07:00
Alarus
af8ff1d1e0
Update hardware/arduino/cores/arduino/HardwareSerial.cpp
...
New Serial.begin(baud, config);
2012-08-14 19:55:13 +06:00
Alarus
1cda182f33
Update hardware/arduino/cores/arduino/HardwareSerial.h
...
New Serial.begin(baud, config);
2012-08-14 19:52:00 +06:00
Alarus
b6faa6e254
Update hardware/arduino/cores/arduino/HardwareSerial.cpp
...
New Serial.begin(baud, config);
2012-08-14 19:50:36 +06:00
Alarus
0c0defa645
Update hardware/arduino/cores/arduino/HardwareSerial.cpp
...
Adding advanced begin (); with the ability to specify the length of bits, parity, stop bits.
2012-08-12 22:07:42 +06:00
Alarus
ed699cf636
Update hardware/arduino/cores/arduino/HardwareSerial.cpp
...
Adding advanced begin (); with the ability to specify the length of bits, parity, stop bits.
2012-08-12 21:35:48 +06:00
Alarus
1f6dd92313
Update hardware/arduino/cores/arduino/HardwareSerial.cpp
...
Adding advanced begin (); with the ability to specify the length of bits, parity, stop bits.
2012-08-12 20:57:57 +06:00
Alarus
03a4b50b8e
Update hardware/arduino/cores/arduino/HardwareSerial.h
...
Adding advanced begin (); with the ability to specify the length of bits, parity, stop bits.
2012-08-12 20:23:00 +06:00
Alarus
b9bbc71dca
Update hardware/arduino/cores/arduino/HardwareSerial.h
...
Adding advanced begin (); with the ability to specify the length of bits, parity, stop bits.
2012-08-12 20:18:50 +06:00
Shigeru KANEMOTO
4293079076
Fix for tone() on Leonardo.
2012-08-08 18:27:40 +09:00
David A. Mellis
e77ee2903b
Print "ovf" if float to be printed doesn't fit in a long.
...
http://code.google.com/p/arduino/issues/detail?id=967
2012-06-28 23:20:56 -04:00
David A. Mellis
2ef2f9d5c7
Print "inf" for infinite floating point numbers (using isinf()).
...
http://code.google.com/p/arduino/issues/detail?id=961
2012-06-23 10:37:35 -05:00
David A. Mellis
29ff4f779a
Adding write(str) and write(buf, size) for USB CDC.
...
So that they work on the Leonardo.
http://code.google.com/p/arduino/issues/detail?id=958
2012-06-14 15:54:13 +01:00
David A. Mellis
3436ca97cb
Printing NaN values as "nan" in printFloat().
...
http://code.google.com/p/arduino/issues/detail?id=946
2012-06-04 23:30:41 -04:00
David A. Mellis
57973bcd49
Check for NULL pointer in Print.write().
...
Otherwise, trying to print(NULL) or write(NULL) could print a random
character.
http://code.google.com/p/arduino/issues/detail?id=941
2012-06-03 07:48:32 -04:00
Kristian Lauszus
4ed0bd2bd5
Added support for interrupt on INT2 and INT3 on the Leonardo
2012-06-02 20:08:46 +02:00
David A. Mellis
810803c6d3
Merge remote-tracking branch 'upstream/master'
2012-05-21 09:31:54 -07:00
David A. Mellis
b495294aa3
Adding readString() and readStringUntil() to Stream (Adrian McEwen).
...
This isn't necessarily a particularly efficient implementation (it
allocates memory one character at a time and so may lead to
fragmentation) but it seems to work.
http://code.google.com/p/arduino/issues/detail?id=454
2012-05-16 15:39:34 -04:00
Zach Eveland
efa7593772
Mouse.isPressed() now checks only for left button by default
...
if no argument is given now checks left button by default to be consistent with press() and release() (thanks, David Mellis)
2012-05-15 15:48:51 -04:00
Zach Eveland
757a77ab67
renamed Leonardo USB_ class to USBDevice_ to be unambiguous. renamed "USB" object to "USBDevice" to prevent conflict with USB Host library (thanks Massimo)
2012-05-01 11:18:15 -04:00
Zach Eveland
d755d0035d
changed PID values for Leonardo bootloader and sketch
...
done to avoid driver problems for users who installed the pre-release bootloader and driver
2012-04-25 15:56:18 -04:00
Zach Eveland
6ae1a17235
bugfix for configuring PWM on D6 and D13 too early. (thanks to Limor Fried)
...
was starting PWM on these pins too soon - in init() instead of when analogWrite() was called. as a result doing output on port registers directly failed.
2012-04-19 15:52:16 -04:00
Zach Eveland
56ddc4637d
bugfix for boards with a timer 4 but no channel D
...
compilation failed for Mega because the COM4D1 and OCR4D registers are defined for 32U4 but not for Mega
2012-04-19 15:46:32 -04:00
Zach Eveland
49f7fb00fd
fixed logic bug in Caterina that could stop the bootloader from entering self-programming mode
2012-04-11 23:19:05 -04:00