Commit Graph

15 Commits

Author SHA1 Message Date
Sandeep Mistry 7259ab4941 Cast to "unsigned int" instead of just "unsigned" for consistency 2016-07-18 15:04:29 -04:00
Benoît Blanchon cb38e4d586 Speed and size improvement in Print::printFloat()
Avoid using the overload of print() for signed integer since a negative value is not allowed here.
This results in a smaller (unless print(int) is used somewhere else in the program) and faster code because the overload for unsigned integer is simpler.
2016-03-08 22:13:10 +01:00
tico-tico 11db98c425 huh? i guess it's just 'modulo'. let's save even more 2016-03-03 10:53:25 -05:00
Chuck Todd 2e08ab180b Print not Aborting on Write() failure
Print::write(const uint8_t *buffer, size_t size) and Print::print(const
__FlashStringHelper *ifsh) would continue calling write(char) after a
failed write(char) this behavior would render returned count unuseable
see arduino/Arduino issue #3614
2015-08-12 11:47:57 +02:00
Chris--A 969ce0b007 Optimize printLn calls. 2015-05-22 23:00:07 +10:00
Cristian Maglie 7e0d99f370 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 d2829c7885 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 7555a8a731 Use reinterpret_cast to cast __FlashStringHelper to const char* 2013-12-27 20:01:03 +01:00
Matthijs Kooijman 233519419b 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
Federico Fissore 62914c08db Print.print optimization. Closes #1760 2013-12-23 11:50:39 +01:00
Federico Fissore 61eace3a23 fixed permissions on a lot of text files. see #1116 2012-12-10 10:42:49 +01:00
Cristian Maglie 77b2619a6c Merged latest changes in AVR arduino core 2012-10-18 18:47:50 +02:00
Cristian Maglie 599e7eee69 Merged upstream Arduino master branch 2012-06-26 00:51:35 +02:00
Cristian Maglie 49d12c697e Pre-merge upstream Arduino 2012-05-22 11:23:47 +02:00
Cristian Maglie 822dcb0989 Created second level in hardware folder: hardware/PACKAGE/PLATFORM/...
Made some helper class for files filtering.
platforms.txt now contains only one platform at a time.
Some cleanup in Compiler and AvrDudeUploader classes.
2011-12-30 15:46:04 +01:00