Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b2bbeec

Browse filesBrowse files
authored
Merge branch 'master' into master
2 parents f859a91 + 1977370 commit b2bbeec
Copy full SHA for b2bbeec

File tree

Expand file treeCollapse file tree

334 files changed

+14597
-4766
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

334 files changed

+14597
-4766
lines changed

‎CMakeLists.txt

Copy file name to clipboardExpand all lines: CMakeLists.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ set(COMPONENT_ADD_INCLUDEDIRS
205205

206206
set(COMPONENT_PRIV_INCLUDEDIRS cores/esp32/libb64)
207207

208-
set(COMPONENT_REQUIRES spi_flash mbedtls mdns ethernet)
208+
set(COMPONENT_REQUIRES spi_flash mbedtls mdns ethernet esp_adc_cal)
209209
set(COMPONENT_PRIV_REQUIRES fatfs nvs_flash app_update spiffs bootloader_support openssl bt)
210210

211211
register_component()

‎boards.txt

Copy file name to clipboardExpand all lines: boards.txt
+529-3Lines changed: 529 additions & 3 deletions
Large diffs are not rendered by default.

‎cores/esp32/HardwareSerial.cpp

Copy file name to clipboardExpand all lines: cores/esp32/HardwareSerial.cpp
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,24 @@ int HardwareSerial::read(void)
131131
return -1;
132132
}
133133

134+
// read characters into buffer
135+
// terminates if size characters have been read, or no further are pending
136+
// returns the number of characters placed in the buffer
137+
// the buffer is NOT null terminated.
138+
size_t HardwareSerial::read(uint8_t *buffer, size_t size)
139+
{
140+
size_t avail = available();
141+
if (size < avail) {
142+
avail = size;
143+
}
144+
size_t count = 0;
145+
while(count < avail) {
146+
*buffer++ = uartRead(_uart);
147+
count++;
148+
}
149+
return count;
150+
}
151+
134152
void HardwareSerial::flush(void)
135153
{
136154
uartFlush(_uart);

‎cores/esp32/HardwareSerial.h

Copy file name to clipboardExpand all lines: cores/esp32/HardwareSerial.h
+9-1Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,19 @@ class HardwareSerial: public Stream
6262
int availableForWrite(void);
6363
int peek(void);
6464
int read(void);
65+
size_t read(uint8_t *buffer, size_t size);
66+
inline size_t read(char * buffer, size_t size)
67+
{
68+
return read((uint8_t*) buffer, size);
69+
}
6570
void flush(void);
6671
void flush( bool txOnly);
6772
size_t write(uint8_t);
6873
size_t write(const uint8_t *buffer, size_t size);
69-
74+
inline size_t write(const char * buffer, size_t size)
75+
{
76+
return write((uint8_t*) buffer, size);
77+
}
7078
inline size_t write(const char * s)
7179
{
7280
return write((uint8_t*) s, strlen(s));

‎cores/esp32/WString.h

Copy file name to clipboardExpand all lines: cores/esp32/WString.h
+28-1Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,20 @@ class String {
203203
unsigned char equalsIgnoreCase(const String &s) const;
204204
unsigned char equalsConstantTime(const String &s) const;
205205
unsigned char startsWith(const String &prefix) const;
206+
unsigned char startsWith(const char *prefix) const {
207+
return this->startsWith(String(prefix));
208+
}
209+
unsigned char startsWith(const __FlashStringHelper *prefix) const {
210+
return this->startsWith(String(prefix));
211+
}
206212
unsigned char startsWith(const String &prefix, unsigned int offset) const;
207213
unsigned char endsWith(const String &suffix) const;
214+
unsigned char endsWith(const char *suffix) const {
215+
return this->endsWith(String(suffix));
216+
}
217+
unsigned char endsWith(const __FlashStringHelper * suffix) const {
218+
return this->endsWith(String(suffix));
219+
}
208220

209221
// character access
210222
char charAt(unsigned int index) const;
@@ -238,7 +250,22 @@ class String {
238250

239251
// modification
240252
void replace(char find, char replace);
241-
void replace(const String& find, const String& replace);
253+
void replace(const String &find, const String &replace);
254+
void replace(const char *find, const String &replace) {
255+
this->replace(String(find), replace);
256+
}
257+
void replace(const __FlashStringHelper *find, const String &replace) {
258+
this->replace(String(find), replace);
259+
}
260+
void replace(const char *find, const char *replace) {
261+
this->replace(String(find), String(replace));
262+
}
263+
void replace(const __FlashStringHelper *find, const char *replace) {
264+
this->replace(String(find), String(replace));
265+
}
266+
void replace(const __FlashStringHelper *find, const __FlashStringHelper *replace) {
267+
this->replace(String(find), String(replace));
268+
}
242269
void remove(unsigned int index);
243270
void remove(unsigned int index, unsigned int count);
244271
void toLowerCase(void);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.