1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-29 18:52:13 +01:00

Merge pull request #1146 from sebastienjean/master

Enhancements in SoftwareSerial lib
This commit is contained in:
Cristian Maglie 2012-12-02 08:41:32 -08:00
commit 24cef2ebe3

View File

@ -40,8 +40,8 @@ http://arduiniana.org.
// //
#include <avr/interrupt.h> #include <avr/interrupt.h>
#include <avr/pgmspace.h> #include <avr/pgmspace.h>
#include "Arduino.h" #include <Arduino.h>
#include "SoftwareSerial.h" #include <SoftwareSerial.h>
// //
// Lookup table // Lookup table
// //
@ -70,6 +70,7 @@ static const DELAY_TABLE PROGMEM table[] =
{ 4800, 233, 474, 474, 471, }, { 4800, 233, 474, 474, 471, },
{ 2400, 471, 950, 950, 947, }, { 2400, 471, 950, 950, 947, },
{ 1200, 947, 1902, 1902, 1899, }, { 1200, 947, 1902, 1902, 1899, },
{ 600, 1902, 3804, 3804, 3800, },
{ 300, 3804, 7617, 7617, 7614, }, { 300, 3804, 7617, 7617, 7614, },
}; };
@ -91,6 +92,7 @@ static const DELAY_TABLE table[] PROGMEM =
{ 4800, 110, 233, 233, 230, }, { 4800, 110, 233, 233, 230, },
{ 2400, 229, 472, 472, 469, }, { 2400, 229, 472, 472, 469, },
{ 1200, 467, 948, 948, 945, }, { 1200, 467, 948, 948, 945, },
{ 600, 948, 1895, 1895, 1890, },
{ 300, 1895, 3805, 3805, 3802, }, { 300, 1895, 3805, 3805, 3802, },
}; };
@ -115,6 +117,7 @@ static const DELAY_TABLE PROGMEM table[] =
{ 4800, 296, 595, 595, 592, }, { 4800, 296, 595, 595, 592, },
{ 2400, 592, 1189, 1189, 1186, }, { 2400, 592, 1189, 1189, 1186, },
{ 1200, 1187, 2379, 2379, 2376, }, { 1200, 1187, 2379, 2379, 2376, },
{ 600, 2379, 4759, 4759, 4755, },
{ 300, 4759, 9523, 9523, 9520, }, { 300, 4759, 9523, 9523, 9520, },
}; };