aboutsummaryrefslogtreecommitdiff
path: root/cores
AgeCommit message (Collapse)Author
2014-01-16Simplify HardwareSerial::begin()Matthijs Kooijman
This simplifies the baud rate calculation, removing the need for a goto and shortening the code a bit. Other than that, this code should not use any different settings than before. Code was suggested by Rob Tillaart on github. Closes: #1262
2014-01-16Remove unused variableMatthijs Kooijman
2014-01-16Slightly reduce code utilization by inlining HardwareSerail begin(baud) and ↵Cristian Maglie
operator bool()
2014-01-16Remove duplicate code from HardwareSerial::begin() methods.Matthijs Kooijman
There are two begin methods, one which accepts just a baud rate and uses the default bit settings and one which accepts both a baudrate and a bit config. Previously, both of these contained a complete implementation, but now the former just calls the latter, explicitely passing the default 8N1 configuration. Technically, this causes a small change: Before the UCSRC register was untouched when calling begin(baud), now it is explicitely initialized with 8N1. However, since this is the default configuration for at least the Uno and the Mega (didn't check any others), probably for all avrs, this shouldn't effectively change anything. Given that the Arduino documentation also documents this as the default when none is passed, explicitly setting it is probably a good idea in any case.
2014-01-15Make some operators in IPAddress constMatthijs Kooijman
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-06Removed = char from #define. See ↵Federico Fissore
https://github.com/arduino/Arduino/issues/1792#issuecomment-31650586
2014-01-06Added new EULER constant. Fixes #1792Federico Fissore
2014-01-01Improved portability of String class (maniacbug)Cristian Maglie
2013-12-31Merge branch 'cast' of github.com:Lauszus/Arduino into Lauszus-castCristian Maglie
Conflicts: hardware/arduino/avr/cores/arduino/Print.cpp
2013-12-31Use PGM_P instead of prog_charMatthijs Kooijman
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-27Use reinterpret_cast to cast __FlashStringHelper to const char*Kristian Lauszus
2013-12-24Remove unneeded casts in Print::write(const String&)Matthijs Kooijman
Now that Print::write(const char*) is also available, these casts are no longer needed.
2013-12-24Add uint8_t* versions of methods in StreamMatthijs Kooijman
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-24Add Print::write(const char *, size_t)Matthijs Kooijman
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-23Print.print optimization. Closes #1760Federico Fissore
2013-12-06remove all Changes besides operator==ntruchsess
2013-11-27add localPort to EthernetClient, simplify operator==ntruchsess
2013-11-26add operator==, remoteIP and remotePort to EthernetClientntruchsess
2013-10-31Using NOT_AN_INTERRUPT defined constantCristian Maglie
2013-09-30Merge branch 'master' into ide-1.5.xCristian Maglie
2013-09-10Merge branch 'ide-1.5.x' into dev-ide-1.5.x-discoveryCristian Maglie
Conflicts: build/shared/revisions.txt
2013-09-09Fixed HardwareSerial bug introduced in 1.5.3.Cristian Maglie
Fixes #1568
2013-09-06Merge remote-tracking branch 'arduino/ide-1.5.x' into dev-ide-1.5.x-discoveryFederico Fissore
2013-09-03Fixed String class regression after f80c6c5f35cddcf4761a3c97feb8504425e9d27dCristian Maglie
This should make explicit String-from-integer constructor working again: int a = 10; String(a, 4);
2013-09-02USB CDC two argument begin()Paul Brook
Add two argument form of Serial_::begin Signed-off-by: Paul Brook <paul@nowt.org>
2013-09-02USB serial baud arg typePaul Brook
Make USB Serial_::begin() function take an unsigned long argument for consistency with HardwareSerial. Signed-off-by: Paul Brook <paul@nowt.org>
2013-08-23Merge branch 'ide-1.5.x' into dev-ide-1.5.x-discoveryCristian Maglie
Conflicts: app/src/processing/app/Preferences.java app/src/processing/app/debug/Uploader.java
2013-08-22Merged robot coreCristian Maglie
2013-08-20Removed unused flags from String (free 1 byte of SRAM)Cristian Maglie
2013-07-31Merge branch 'master' into ide-1.5.xCristian Maglie
2013-07-31Merge branch 'issue1366' of github.com:Lauszus/Arduino into Lauszus-issue1366Cristian Maglie
2013-07-30Merge branch 'ide-1.5.x' into dev-ide-1.5.x-discoveryCristian Maglie
Conflicts: hardware/arduino/avr/cores/arduino/USBCore.cpp
2013-07-30Applied USB CDC updates to robot's core.Cristian Maglie
2013-07-27Move buffers into USB CDC (look #947 and #1369 for reference)Cristian Maglie
2013-07-26Applied HardwareSerial updates to robot's core.Cristian Maglie
2013-07-26Fixed compile problem for Leonardo after ↵Cristian Maglie
0bd6a2d20fb9664255b20e0db11dd4586ebe9007
2013-07-26Make private members of HardwareSerial protectedMatthijs Kooijman
This allows users to create subclasses. Closes: #947
2013-07-26Move buffers into HardwareSerialMatthijs Kooijman
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-26Use uint8_t for HardwareSerial ringbuffer pointersMatthijs Kooijman
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-17Remove hardcoded product names (all provided for in boards.txt)Angus Gratton
2013-07-17Fix whitespace (tabify), oopsAngus Gratton
2013-07-17Allow USB product and manufacturer strings to be supplied in boards.txtAngus Gratton
2013-07-04Refactored YunClient and YunServer classes.Cristian Maglie
Added YunClient.connect() methods.
2013-06-28Merge remote-tracking branch 'arduino/ide-1.5.x' into dev-ide-1.5.x-discoveryFederico Fissore
2013-06-28String: fixed number of whitespaces in concat() methodsCristian Maglie
2013-06-25Merge remote-tracking branch 'arduino/ide-1.5.x' into ide-1.5.x-discoveryFederico Fissore
2013-06-21String: changed default to 2 decimal digitsCristian Maglie
2013-06-07Merge branch 'ide-1.5.x' into ide-1.5.x-discoveryCristian Maglie
2013-06-06Fixed buffer overflow on String class (Paul Stoffregen)Cristian Maglie
2013-06-06Merged various bugfix / improvements to String class.Cristian Maglie
Merge branch 'master' into ide-1.5.x