Commit graph

24 commits

Author SHA1 Message Date
Scott Lahteine
d015f746cc
Fix some compile warnings (#12220) 2018-10-26 03:53:06 -05:00
AnoNymous
001f26b642 Template struct simplification for serial (#11990) 2018-10-03 11:01:21 -05:00
Eduardo José Tagle
d6955f25b2 Expand serial support in DUE/AVR hals exploiting the templated MarlinSerial classes (#11988) 2018-10-03 00:47:27 -05:00
Eduardo José Tagle
f6f2246f59 Templatized serial classes (#11982) 2018-10-02 22:15:30 -05:00
Eduardo José Tagle
5590c8ffd0 Fix MarlinSerial (AVR) (#10991)
An undocumented hw bug makes the UART lose chars when RX ISR is disabled, even for a very small amount of time. This happens when RX_BUFFER > 256, and the result is corrupted received commands. Solved by implementing pseudo-atomic operations on 16bit indices.
2018-06-10 20:32:20 -05:00
etagle
99af086cea Add hidden Serial overflow debug options 2018-06-10 04:25:42 -05:00
etagle
d90e8fcad9 Fix XON/XOFF implementation
Pointed out by @GMagician
2018-06-10 04:25:42 -05:00
Giuliano
c9d1a620d4 [2.0.x] fix indentations (#10934) 2018-06-05 02:03:26 -05:00
Eduardo José Tagle
d3c02410a8 [2.0.x] Small assorted collection of fixes and improvements (#10911)
* Misc fixes and improvements

- Get rid of most critical sections on the Serial port drivers for AVR and DUE. Proper usage of FIFOs should allow interrupts to stay enabled without harm to queuing and dequeuing.
  Also, with 8-bit indices (for AVR) and up to 32-bit indices (for ARM), there is no need to protect reads and writes to those indices.
- Simplify the XON/XOFF logic quite a bit. Much cleaner now (both for AVR and ARM)
- Prevent a race condition (edge case) that could happen when estimating the proper value for the stepper timer (by reading it) and writing the calculated value for the time to the next ISR by disabling interrupts in those critical and small sections of the code - The problem could lead to lost steps.
- Fix dual endstops not properly homing bug (maybe).

* Set position immediately when possible
2018-06-01 19:02:22 -05:00
Scott Lahteine
2578996631
[2.0.x] Emergency parser for multiple serial ports (#10524) 2018-04-25 20:58:00 -05:00
Chris Pepper
2242b98248 [LPC176x] Emergency Parser Feature (#10516) 2018-04-25 06:44:26 -05:00
Scott Lahteine
649f375494
Fix: M112 calling kill from interrupt (#9923)
Fix #9906
2018-03-03 23:14:01 -06:00
Scott Lahteine
7d6c009104 Add thermistor 15 tuned for JGAurora A5 2018-01-22 01:27:11 -06:00
Roxy-3D
bfd9728cf4
Serial buffer over run work around for v2.0.0 (#9236)
* Work around for serial buffer over run

PronterFace sends a lot of M105 commands.  During long operations such
as UBL's G29 P1, G29 P2, G29 P4 and G26 this can over run the serial
buffer.   This results (very often) in a M1 (actually a M1M105) ending
up in the command queue.

Until we figure out a better way to resolve this issue, this will keep
the UBL commands from experiencing bogus commands at thier completion.
2018-01-18 19:57:18 -06:00
etagle
c9bbef6380 Cosmetic fix for HAL_AVR/MarlinSerial.cpp
Instead of using const char, it is better to use uint8_t
2017-10-27 03:24:23 -05:00
Scott Lahteine
732e87e83c Merge pull request #7892 from GMagician/Serial-double-echo-fix
[2.0.x] Serial double echo fix
2017-10-10 02:42:16 -05:00
GMagician
546f02c6f4 [2.0.x] Addressing #7896
Compiler error, added char c variable
2017-10-08 23:16:35 +02:00
GMagician
eb96d37da0 Serial double echo fix
Fix double character sent when TX buffer size is 0 on mega2560
2017-10-07 22:20:00 +02:00
Scott Lahteine
9fe7f53216 Misc general spacing cleanup 2017-10-06 15:14:01 -05:00
Scott Lahteine
7258218f89 Fix xon_xoff_state initialization 2017-10-04 12:11:56 -05:00
Scott Lahteine
508d764d63 Add serial XON/XOFF handshaking
From @ejtagle, originally #7459
2017-10-02 04:12:30 -05:00
Dave Johnson
f58ba3a64e Improve AVR arch detection
Replace ARDUINO_ARCH_AVR with __AVR__ to better detect architecture for non-Arduino dev environments.  Resolves compile failure in PIO for 8-bit Teensduino targets

More info:
https://forum.pjrc.com/threads/33234-Using-Teensyduino-Selecting-Teensy-3-2-3-1-board-has-incorrect-platform-define
http://www.atmel.com/webdoc/avrlibcreferencemanual/using_tools_1using_avr_gcc_mach_opt.html
2017-09-23 21:36:40 -07:00
Scott Lahteine
54326fb06a HAL updates 2017-09-21 15:52:17 -05:00
Christopher Pepper
4b16fa3272 Implement HAL and apply macros across code-base
Implement AVR Platform
2017-08-31 18:14:31 -05:00
Renamed from Marlin/MarlinSerial.cpp (Browse further)