Skip to content
This repository was archived by the owner on Jan 29, 2023. It is now read-only.

Commit 87619ea

Browse files
authored
Update Packages_Patches
1 parent 10ac22b commit 87619ea

File tree

6 files changed

+162
-168
lines changed

6 files changed

+162
-168
lines changed

Packages_Patches/hardware/teensy/avr/cores/teensy/Stream.cpp

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
/*
2-
Stream.cpp - adds parsing methods to Stream class
3-
Copyright (c) 2008 David A. Mellis. All right reserved.
2+
Stream.cpp - adds parsing methods to Stream class
3+
Copyright (c) 2008 David A. Mellis. All right reserved.
44
5-
This library is free software; you can redistribute it and/or
6-
modify it under the terms of the GNU Lesser General Public
7-
License as published by the Free Software Foundation; either
8-
version 2.1 of the License, or (at your option) any later version.
5+
This library is free software; you can redistribute it and/or
6+
modify it under the terms of the GNU Lesser General Public
7+
License as published by the Free Software Foundation; either
8+
version 2.1 of the License, or (at your option) any later version.
99
10-
This library is distributed in the hope that it will be useful,
11-
but WITHOUT ANY WARRANTY; without even the implied warranty of
12-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13-
Lesser General Public License for more details.
10+
This library is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
Lesser General Public License for more details.
1414
15-
You should have received a copy of the GNU Lesser General Public
16-
License along with this library; if not, write to the Free Software
17-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
15+
You should have received a copy of the GNU Lesser General Public
16+
License along with this library; if not, write to the Free Software
17+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1818
19-
Created July 2011
20-
parsing functions based on TextFinder library by Michael Margolis
21-
*/
19+
Created July 2011
20+
parsing functions based on TextFinder library by Michael Margolis
21+
*/
2222

2323
#include <Arduino.h>
2424

@@ -201,8 +201,7 @@ long Stream::parseInt(char skipChar)
201201

202202
read(); // consume the character we got with peek
203203
c = timedPeek();
204-
}
205-
while ( (c >= '0' && c <= '9') || c == skipChar );
204+
} while ( (c >= '0' && c <= '9') || c == skipChar );
206205

207206
if (isNegative)
208207
value = -value;
@@ -252,8 +251,7 @@ float Stream::parseFloat(char skipChar)
252251

253252
read(); // consume the character we got with peek
254253
c = timedPeek();
255-
}
256-
while ( (c >= '0' && c <= '9') || c == '.' || c == skipChar );
254+
} while ( (c >= '0' && c <= '9') || c == '.' || c == skipChar );
257255

258256
if (isNegative)
259257
value = -value;

Packages_Patches/hardware/teensy/avr/cores/teensy/Stream.h

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -33,78 +33,78 @@ class Stream : public Print
3333

3434
void setTimeout(unsigned long timeout);
3535
bool find(const char *target);
36-
37-
bool find(const uint8_t *target)
36+
37+
bool find(const uint8_t *target)
3838
{
3939
return find ((const char *)target);
4040
}
41-
42-
bool find(const String &target)
41+
42+
bool find(const String &target)
4343
{
4444
return find(target.c_str());
4545
}
46-
46+
4747
bool find(const char *target, size_t length);
48-
49-
bool find(const uint8_t *target, size_t length)
48+
49+
bool find(const uint8_t *target, size_t length)
5050
{
5151
return find ((const char *)target, length);
5252
}
53-
54-
bool find(const String &target, size_t length)
53+
54+
bool find(const String &target, size_t length)
5555
{
5656
return find(target.c_str(), length);
5757
}
58-
58+
5959
bool findUntil(const char *target, const char *terminator);
60-
61-
bool findUntil(const uint8_t *target, const char *terminator)
60+
61+
bool findUntil(const uint8_t *target, const char *terminator)
6262
{
6363
return findUntil((const char *)target, terminator);
6464
}
65-
66-
bool findUntil(const String &target, const char *terminator)
65+
66+
bool findUntil(const String &target, const char *terminator)
6767
{
6868
return findUntil(target.c_str(), terminator);
6969
}
70-
71-
bool findUntil(const char *target, const String &terminator)
70+
71+
bool findUntil(const char *target, const String &terminator)
7272
{
7373
return findUntil(target, terminator.c_str());
7474
}
75-
76-
bool findUntil(const String &target, const String &terminator)
75+
76+
bool findUntil(const String &target, const String &terminator)
7777
{
7878
return findUntil(target.c_str(), terminator.c_str());
7979
}
80-
80+
8181
bool findUntil(const char *target, size_t targetLen, const char *terminate, size_t termLen);
82-
83-
bool findUntil(const uint8_t *target, size_t targetLen, const char *terminate, size_t termLen)
82+
83+
bool findUntil(const uint8_t *target, size_t targetLen, const char *terminate, size_t termLen)
8484
{
8585
return findUntil((const char *)target, targetLen, terminate, termLen);
8686
}
87-
87+
8888
bool findUntil(const String &target, size_t targetLen, const char *terminate, size_t termLen);
8989
bool findUntil(const char *target, size_t targetLen, const String &terminate, size_t termLen);
9090
bool findUntil(const String &target, size_t targetLen, const String &terminate, size_t termLen);
91-
91+
9292
long parseInt();
9393
long parseInt(char skipChar);
94-
94+
9595
float parseFloat();
9696
float parseFloat(char skipChar);
97-
97+
9898
size_t readBytes(char *buffer, size_t length);
99-
100-
size_t readBytes(uint8_t *buffer, size_t length)
99+
100+
size_t readBytes(uint8_t *buffer, size_t length)
101101
{
102102
return readBytes((char *)buffer, length);
103103
}
104-
104+
105105
size_t readBytesUntil(char terminator, char *buffer, size_t length);
106-
107-
size_t readBytesUntil(char terminator, uint8_t *buffer, size_t length)
106+
107+
size_t readBytesUntil(char terminator, uint8_t *buffer, size_t length)
108108
{
109109
return readBytesUntil(terminator, (char *)buffer, length);
110110
}
@@ -117,22 +117,22 @@ class Stream : public Print
117117
char* readCharsUntil(char terminator, size_t max = 512);
118118
////////////////////////////////////////////////////////////
119119

120-
int getReadError()
120+
int getReadError()
121121
{
122122
return read_error;
123123
}
124-
125-
void clearReadError()
124+
125+
void clearReadError()
126126
{
127127
setReadError(0);
128128
}
129-
129+
130130
protected:
131-
void setReadError(int err = 1)
131+
void setReadError(int err = 1)
132132
{
133133
read_error = err;
134134
}
135-
135+
136136
unsigned long _timeout;
137137

138138
// KH

Packages_Patches/hardware/teensy/avr/cores/teensy3/Stream.cpp

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
/*
2-
Stream.cpp - adds parsing methods to Stream class
3-
Copyright (c) 2008 David A. Mellis. All right reserved.
2+
Stream.cpp - adds parsing methods to Stream class
3+
Copyright (c) 2008 David A. Mellis. All right reserved.
44
5-
This library is free software; you can redistribute it and/or
6-
modify it under the terms of the GNU Lesser General Public
7-
License as published by the Free Software Foundation; either
8-
version 2.1 of the License, or (at your option) any later version.
5+
This library is free software; you can redistribute it and/or
6+
modify it under the terms of the GNU Lesser General Public
7+
License as published by the Free Software Foundation; either
8+
version 2.1 of the License, or (at your option) any later version.
99
10-
This library is distributed in the hope that it will be useful,
11-
but WITHOUT ANY WARRANTY; without even the implied warranty of
12-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13-
Lesser General Public License for more details.
10+
This library is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
Lesser General Public License for more details.
1414
15-
You should have received a copy of the GNU Lesser General Public
16-
License along with this library; if not, write to the Free Software
17-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
15+
You should have received a copy of the GNU Lesser General Public
16+
License along with this library; if not, write to the Free Software
17+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1818
19-
Created July 2011
20-
parsing functions based on TextFinder library by Michael Margolis
21-
*/
19+
Created July 2011
20+
parsing functions based on TextFinder library by Michael Margolis
21+
*/
2222

2323
#include <Arduino.h>
2424

@@ -201,8 +201,7 @@ long Stream::parseInt(char skipChar)
201201

202202
read(); // consume the character we got with peek
203203
c = timedPeek();
204-
}
205-
while ( (c >= '0' && c <= '9') || c == skipChar );
204+
} while ( (c >= '0' && c <= '9') || c == skipChar );
206205

207206
if (isNegative)
208207
value = -value;
@@ -252,8 +251,7 @@ float Stream::parseFloat(char skipChar)
252251

253252
read(); // consume the character we got with peek
254253
c = timedPeek();
255-
}
256-
while ( (c >= '0' && c <= '9') || c == '.' || c == skipChar );
254+
} while ( (c >= '0' && c <= '9') || c == '.' || c == skipChar );
257255

258256
if (isNegative)
259257
value = -value;

Packages_Patches/hardware/teensy/avr/cores/teensy3/Stream.h

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -33,78 +33,78 @@ class Stream : public Print
3333

3434
void setTimeout(unsigned long timeout);
3535
bool find(const char *target);
36-
37-
bool find(const uint8_t *target)
36+
37+
bool find(const uint8_t *target)
3838
{
3939
return find ((const char *)target);
4040
}
41-
42-
bool find(const String &target)
41+
42+
bool find(const String &target)
4343
{
4444
return find(target.c_str());
4545
}
46-
46+
4747
bool find(const char *target, size_t length);
48-
49-
bool find(const uint8_t *target, size_t length)
48+
49+
bool find(const uint8_t *target, size_t length)
5050
{
5151
return find ((const char *)target, length);
5252
}
53-
54-
bool find(const String &target, size_t length)
53+
54+
bool find(const String &target, size_t length)
5555
{
5656
return find(target.c_str(), length);
5757
}
58-
58+
5959
bool findUntil(const char *target, const char *terminator);
60-
61-
bool findUntil(const uint8_t *target, const char *terminator)
60+
61+
bool findUntil(const uint8_t *target, const char *terminator)
6262
{
6363
return findUntil((const char *)target, terminator);
6464
}
65-
66-
bool findUntil(const String &target, const char *terminator)
65+
66+
bool findUntil(const String &target, const char *terminator)
6767
{
6868
return findUntil(target.c_str(), terminator);
6969
}
70-
71-
bool findUntil(const char *target, const String &terminator)
70+
71+
bool findUntil(const char *target, const String &terminator)
7272
{
7373
return findUntil(target, terminator.c_str());
7474
}
75-
76-
bool findUntil(const String &target, const String &terminator)
75+
76+
bool findUntil(const String &target, const String &terminator)
7777
{
7878
return findUntil(target.c_str(), terminator.c_str());
7979
}
80-
80+
8181
bool findUntil(const char *target, size_t targetLen, const char *terminate, size_t termLen);
82-
83-
bool findUntil(const uint8_t *target, size_t targetLen, const char *terminate, size_t termLen)
82+
83+
bool findUntil(const uint8_t *target, size_t targetLen, const char *terminate, size_t termLen)
8484
{
8585
return findUntil((const char *)target, targetLen, terminate, termLen);
8686
}
87-
87+
8888
bool findUntil(const String &target, size_t targetLen, const char *terminate, size_t termLen);
8989
bool findUntil(const char *target, size_t targetLen, const String &terminate, size_t termLen);
9090
bool findUntil(const String &target, size_t targetLen, const String &terminate, size_t termLen);
91-
91+
9292
long parseInt();
9393
long parseInt(char skipChar);
94-
94+
9595
float parseFloat();
9696
float parseFloat(char skipChar);
97-
97+
9898
size_t readBytes(char *buffer, size_t length);
99-
100-
size_t readBytes(uint8_t *buffer, size_t length)
99+
100+
size_t readBytes(uint8_t *buffer, size_t length)
101101
{
102102
return readBytes((char *)buffer, length);
103103
}
104-
104+
105105
size_t readBytesUntil(char terminator, char *buffer, size_t length);
106-
107-
size_t readBytesUntil(char terminator, uint8_t *buffer, size_t length)
106+
107+
size_t readBytesUntil(char terminator, uint8_t *buffer, size_t length)
108108
{
109109
return readBytesUntil(terminator, (char *)buffer, length);
110110
}
@@ -117,22 +117,22 @@ class Stream : public Print
117117
char* readCharsUntil(char terminator, size_t max = 512);
118118
////////////////////////////////////////////////////////////
119119

120-
int getReadError()
120+
int getReadError()
121121
{
122122
return read_error;
123123
}
124-
125-
void clearReadError()
124+
125+
void clearReadError()
126126
{
127127
setReadError(0);
128128
}
129-
129+
130130
protected:
131-
void setReadError(int err = 1)
131+
void setReadError(int err = 1)
132132
{
133133
read_error = err;
134134
}
135-
135+
136136
unsigned long _timeout;
137137

138138
// KH

0 commit comments

Comments
 (0)