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

18 Commits

Author SHA1 Message Date
Allman-astyler
eea9999dc5 Revert "Allman now (#6080)" (#6090)
This reverts commit 98125f88605cd7e46e9be4e1b3ad0600dd5d2b51.
2019-05-14 00:09:54 +02:00
Allman-astyler
98125f8860 Allman now (#6080)
* switch restyle script for CI

* remove confirmation

* restyle with allman
2019-05-13 16:41:34 +02:00
Markus Sattler
531d748936 rename cbuf::getSize to cbuf::available (return available Bytes in cbuf)
add cbuf::size (return size of cbuf)
2016-01-26 18:21:42 +01:00
Markus Sattler
fa38ce4079 allow cbuf as chain 2016-01-26 17:40:01 +01:00
Markus Sattler
e2a73ef385 move function code of cbuf to cbuf.cpp
add peek for multiple bytes
add remove
add resizeAdd
add resize
2016-01-23 11:28:30 +01:00
Christopher Pascoe
cfe7ae1118 Put HardwareSerial and cbuf methods called from interrupt context in RAM.
This is required per the non-OS SDK doc, which states:
  "Using non-OS SDK, please do not call any function defined with
  ICACHE_FLASH_ATTR in the interrupt handler."

This avoids an "Illegal instruction" exception with epc1 pointing at a valid
instruction (in flash) for one of the moved methods.
2015-12-28 18:35:27 -05:00
Christopher Pascoe
e83dd4d241 Use lightweight tests when we only care if the buffer is empty or full. 2015-12-28 17:53:10 -05:00
Christopher Pascoe
afbc049cc9 Make the circular buffer's _size and _bufend members immutable. 2015-12-13 19:17:15 -08: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
Ivan Grokhotkov
2a297ca171 Fix cbuf running out of bounds (#348) 2015-09-13 22:45:00 +03:00
Neil Kolban
b500a1f26a Made changes to allow the compiler to compile without warnings. 2015-08-09 14:10:20 -05:00
Markus Sattler
d6f62943d4 fix problems with serial and cbuf (some times freeze on high load) 2015-06-19 10:41:20 +02:00
Markus Sattler
f165a0afcd use Eclipse auto Format to get rip auf the tab, space and code style inconsistency 2015-04-06 19:33:50 +02:00
Ivan Grokhotkov
d703131c00 Fix cbuf::read and cbuf::peak return types
Fixes #12
2015-03-29 18:21:32 +03:00
Ivan Grokhotkov
4cf6737823 More license headers 2014-12-19 01:43:18 +03:00
Ivan Grokhotkov
2a77249147 Implement tx and rx buffers and interrupts for HardwareSerial 2014-12-18 18:49:14 +03:00
Ivan Grokhotkov
4648024946 Add circular buffer implementation 2014-12-01 00:36:07 +03:00