diff options
author | Matthijs Kooijman <matthijs@stdin.nl> | 2013-04-19 15:29:43 +0200 |
---|---|---|
committer | Cristian Maglie <c.maglie@bug.st> | 2014-01-16 13:20:11 +0100 |
commit | 4bc8aa15e3309496e2adf98b5933e4825341df07 (patch) | |
tree | a086b903d5bc05c5bd38e708a01acb2210b7e802 /cores/arduino/wiring_shift.c | |
parent | 46b0ada9a941607de0a2df80bf7f58d3a959ff57 (diff) |
Remove duplicate code from HardwareSerial::begin() methods.
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.
Diffstat (limited to 'cores/arduino/wiring_shift.c')
0 files changed, 0 insertions, 0 deletions