1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-22 21:23:07 +03:00

460 Commits

Author SHA1 Message Date
Andrew Melvin
e12b6ffa40 Merge branch 'master' of https://github.com/esp8266/Arduino into MD5 2016-01-04 13:06:16 +02:00
Markus Sattler
995f02f437 add more debug levels 2016-01-02 12:54:34 +01:00
Markus Sattler
2b23b005aa allow control of enabling debug and debug level from IDE 2016-01-02 12:25:39 +01:00
Andrew Melvin
34db483bb5 fix wrong return type 2016-01-01 13:18:24 +00:00
Andrew Melvin
7d54f5211c Improvements for MD5Builder with Stream 2016-01-01 12:43:35 +00:00
Markus Sattler
d9a7a816d5 include core_esp8266_features.h in arduino.h for easier usage, and add WIFI_HAS_EVENT_CALLBACK 2015-12-29 17:44:00 +01:00
Markus Sattler
85905c12f2 allow multiple event callbacks and add filter option 2015-12-29 17:31:57 +01:00
Markus Sattler
7edcda4a0f IPAddress allow uint32_t compare 2015-12-29 15:26:14 +01:00
Markus Sattler
50ad8ccdf5 rework StreamString::write to use String internal buffer direct.
#1289
2015-12-23 13:40:16 +01:00
Ivan Grokhotkov
1c7b81660b Merge pull request #1289 from gtalusan/short_writes
handle short writes
2015-12-23 10:15:57 +03:00
Ivan Grokhotkov
60baf802e1 Add function to measure stack high water mark (thanks @g3gg0) 2015-12-23 10:13:01 +03:00
Ivan Grokhotkov
66a88ac8d2 Fix bad DEBUGV argument (thanks @g3gg0) 2015-12-23 10:11:40 +03:00
George Talusan
70c85c0901 handle short writes 2015-12-22 21:31:30 -05:00
Ivan Grokhotkov
cda14204fe Fix SPIFFS path length check, add notes about FSInfo structure (#1273) 2015-12-22 11:52:50 +03:00
Ivan Grokhotkov
d460de8879 Merge branch 'me-no-dev-master'
* me-no-dev-master:
  fix identation
  optimize pwm interrupt handler for better precision
2015-12-22 11:17:33 +03:00
Christopher Pascoe
63f1e40106 Fix RAM corruption caused by our hook of register_chipv6_phy(init_data*).
"init_data", when non-NULL, is on the heap, and the register_chipv6_phy call
sometimes modifies data in (at least) the offset range [128:249], suggesting
that it is a buffer larger than 128 bytes in size (the size of our
"phy_init_data" buffer).  When we use our static buffer (prior to this
change), the call could would overwrite the .rodata section and lead to
undefined behaviour.

To address this, just patch the heap-allocated buffer with our data.

Move phy_init_data to flash as it's now readonly and never modified.
2015-12-21 19:18:29 -08:00
Me No Dev
a33dba099f fix identation 2015-12-21 13:54:29 +02:00
Me No Dev
1ae423021a optimize pwm interrupt handler for better precision 2015-12-21 13:50:29 +02:00
Markus Sattler
fa7f7bde81 add _verifyHeader and _verifyEnd
_verifyHeader is called before the beginning of the update progress to verify the first byte using peek
_verifyEnd is called on the end before the eboot command is written to verify first byte + flash config

add missing _reset() on timeout
2015-12-20 12:45:36 +01:00
Markus Sattler
53e01932d3 add magic byte check for Update class
Note: only check of first 0xE9 possible.
2015-12-20 11:46:00 +01:00
Markus Sattler
898737422e ESP class - move interpretation of magic bytes in function 2015-12-19 14:30:13 +01:00
Markus Sattler
8032f77476 add missing ! for the checkFlashConfig call 2015-12-18 08:37:25 +01:00
Markus Sattler
02e6b2fc16 setMD5 has now returns bool
handle setMD5 failed in HTTP update
reset UpdaterClass when MD5 check failed
see: #1244
2015-12-18 08:30:35 +01:00
Ivan Grokhotkov
b66ddbf93a Update to SDK 1.5 (#1102) 2015-12-17 23:14:59 +03:00
Markus Sattler
f57ab609ec move flash size check to a function in ESP class,
allow real size bigger the IDE for Update
2015-12-17 13:02:14 +01:00
Markus Sattler
b2de8735c8 check current flash before starting update, to avoid update problems.
see: #1111
2015-12-16 19:45:55 +01:00
Christopher Pascoe
55e0dab799 Protect HardwareSerial's cbuf usage with InterruptLock. 2015-12-13 19:39:47 -08:00
Christopher Pascoe
afbc049cc9 Make the circular buffer's _size and _bufend members immutable. 2015-12-13 19:17:15 -08:00
Ivan Grokhotkov
e7024fb5b4 SPIFFS: check if path length is valid (#1089) 2015-12-10 23:25:54 +03:00
Markus Sattler
7ea4eb452d fix String bug
length where returning something that is not 0 while buffer where NULL!?
2015-12-10 17:37:09 +01:00
Markus Sattler
49536c78d3 add more debug to Updater.cpp 2015-12-10 17:24:39 +01:00
Markus Sattler
0389657614 give the IP stack more time to handle the data
may help with #1157
2015-12-10 12:48:36 +01:00
Markus Sattler
a9ce1b4f2e add Authorization support for HTTP client 2015-12-09 13:51:55 +01:00
Markus Sattler
62f38bfef3 add base64 class 2015-12-09 13:51:39 +01:00
Markus Sattler
44af3d5e89 Merge remote-tracking branch 'remotes/esp8266/master' 2015-12-08 11:33:25 +01:00
Markus Sattler
02e22b38cb add define RANDOM_REG32 ESP8266_DREG(0x20E44) 2015-12-08 11:33:15 +01:00
Ivan Grokhotkov
93aaa8667d Merge pull request #1166 from alltheblinkythings/SerialStuff
Always arm the "TX FIFO Empty" interrupt after we write into _tx_buffer.
2015-12-07 22:10:41 +03:00
Jens Hauke
dd89de4dad Make pgm_read_byte() and pgm_read_word() usable from c files.
The two defines used reinterpret_cast<> which is only available when
compiling with c++. Now using plain old c casts instead.
2015-12-07 18:01:15 +01:00
Christopher Pascoe
d8417c2855 Remove a check in room() for (_begin == _end). It's covered by the (_end >= _begin) case. 2015-12-07 00:31:46 -08:00
Christopher Pascoe
7133a6c1f9 Ensure that we never write an out of bounds value (_bufend) to _begin or _end, even temporarily.
Testing:
  - Boot tested, ran basic serial I/O code

Notes:
  - Before this change, there are instruction like "s32i.n <reg>, <this>, <_begin>" in the
    disassembled output, followed by an overwrite if <reg> turns out to be _bufend.
    After this change, there is only one store instruction to <_begin> per function.
2015-12-07 00:23:46 -08:00
Christopher Pascoe
cc0a8ead55 Always arm the "TX FIFO Empty" interrupt after we write into _tx_buffer.
This avoids a race where the interrupt handler detects an empty _tx_buffer
just before we write data into it.

Note that commit d6f62943d4b511e7d5fe6147096c8979890416f5 works around
this race when data is continually added to _tx_buffer in the hung state.
We revert that change here as the race should no longer occur.

Testing performed:
 - set UART_CONF1.txfifo_empty_thrhd=0x70 (which exacerbates the issue)
 - generate a ~240 byte burst of data, sent in back-to-back Serial1.write(, 4)
   calls, optionally followed by a Serial1.flush()
Test results:
 - before this change, observe occasional unsent data and hang in flush()
   (if used).
 - after this change, data is sent as expected.
2015-12-06 21:03:05 -08:00
Ivan Grokhotkov
ee314f2cdc fix portInput(Output, Mode)Register definitions to return pointers (#1110) 2015-12-06 20:54:35 +03:00
Ivan Grokhotkov
c6c7d24750 Add __throw_logic_error (#1136) 2015-12-06 20:39:54 +03:00
Markus Sattler
0173749ef2 Merge remote-tracking branch 'remotes/esp8266/master' 2015-12-05 17:19:05 +01:00
Markus Sattler
68a406274a add parameter name to h for better reading 2015-12-05 17:16:53 +01:00
Ivan Grokhotkov
f7bbea407e Fix failure when trying to open empty file (#1126) 2015-12-05 16:29:37 +03:00
Markus Sattler
ac0264767a #1151 SPI definition correction - SPILADDR 2015-12-05 13:04:24 +01:00
Ivan Grokhotkov
6620ec6e36 Set CPU frequency before running setup 2015-12-03 09:09:47 +03:00
Markus Sattler
ee77b6fafe add core_esp8266_features.h to be able to detect the features and librarys included in the ESP core 2015-11-30 19:58:05 +01:00
Me No Dev
bda06d686c Add HTTP Basic Auth to WebServer and libb64 (base64) to core 2015-11-30 03:37:47 +02:00