ser_avr: warn for excessive baudrate skew
On the Arduino running at 16MHz, setting the baudrate to 115200 results
in a 3.5% error, which is enough to cause occasional framing errors with
some adapters which are quite hard to debug.
This patch factors the code for computing the period in a single place
and adds a warning when the baudrate skew exceeds 3%.
Signed-off-by: Bernie Innocenti <bernie@codewiz.org>
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4773
38d2e660-2303-0410-9eaa-
f027e97ec537