Matthijs Kooijman
46b0ada9a9
Make some operators in IPAddress const
...
These functions do not modify the IPAddress object, but were not marked
as const. This meant that you could not do:
void set_ip(const IPAddress& ip) {
uint32_t copy = ip;
}
Since calling operator uint32_t() on ip would discard the constness of
the reference.
2014-01-15 16:20:48 +01:00
Federico Fissore
1c99bf0e83
Removed = char from #define. See https://github.com/arduino/Arduino/issues/1792#issuecomment-31650586
2014-01-06 18:20:37 +01:00
Federico Fissore
64a9681935
Added new EULER constant. Fixes #1792
2014-01-06 09:48:34 +01:00
Cristian Maglie
1eee97d980
Improved portability of String class (maniacbug)
2014-01-01 17:22:40 +01:00
Cristian Maglie
bf37051397
Merge branch 'cast' of github.com:Lauszus/Arduino into Lauszus-cast
...
Conflicts:
hardware/arduino/avr/cores/arduino/Print.cpp
2013-12-31 20:11:08 +01:00
Matthijs Kooijman
1978e82e4e
Use PGM_P instead of prog_char
...
On later versions of avr-libc, prog_char is deprecated. In 0acebeeff48
the one occurence of prog_char was replaced by "char PROGMEM", which is
not entirely correct (PROGMEM is supposed to be an attribute on a
variable, not on a type, even though this is how things work in older
libc versions). However, in 1130fede3a2 a few new occurences of
prog_char are introduced, which break compilation on newer libc versions
again.
This commit changes all these pointer types to use the PGM_P macro from
<avr/pgmspace.h>. This macro is just "const char *" in newer libc
versions and "const prog_char *" in older versions, so it should always
work.
References #795
2013-12-31 20:01:40 +01:00
Kristian Lauszus
ad9f78d727
Use reinterpret_cast to cast __FlashStringHelper to const char*
2013-12-27 20:01:03 +01:00
Matthijs Kooijman
94cf4c2830
Remove unneeded casts in Print::write(const String&)
...
Now that Print::write(const char*) is also available, these casts are no
longer needed.
2013-12-24 13:22:43 +01:00
Matthijs Kooijman
0fd4002607
Add uint8_t* versions of methods in Stream
...
The new functions just call their char* equivalents, but this allows
reading bytes into a buffer of uint8_t as well as chars.
2013-12-24 13:22:42 +01:00
Matthijs Kooijman
7ded037878
Add Print::write(const char *, size_t)
...
The new function just calls Print::write(const uint8_t *, size_t), but
this allows writing out a buffer of chars (without having to learn about
casts).
2013-12-24 13:22:42 +01:00
Federico Fissore
dce9146485
Print.print optimization. Closes #1760
2013-12-23 11:50:39 +01:00
Cristian Maglie
9b4562c4c5
Using NOT_AN_INTERRUPT defined constant
2013-10-31 12:44:24 +01:00
Cristian Maglie
d7ed6ec361
Merge branch 'master' into ide-1.5.x
2013-09-30 16:25:10 +02:00
Cristian Maglie
1d865de59a
Merge branch 'ide-1.5.x' into dev-ide-1.5.x-discovery
...
Conflicts:
build/shared/revisions.txt
2013-09-10 12:10:57 +02:00
Cristian Maglie
eb45bb95e0
Fixed HardwareSerial bug introduced in 1.5.3.
...
Fixes #1568
2013-09-09 13:09:27 +02:00
Federico Fissore
35f10e412f
Merge remote-tracking branch 'arduino/ide-1.5.x' into dev-ide-1.5.x-discovery
2013-09-06 12:59:24 +02:00
Cristian Maglie
cbeaa543fc
Fixed String class regression after f80c6c5f35cddcf4761a3c97feb8504425e9d27d
...
This should make explicit String-from-integer constructor working again:
int a = 10;
String(a, 4);
2013-09-03 18:40:30 +02:00
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