aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/serialhdl.py
Commit message (Collapse)AuthorAgeFilesLines
...
* build: Define DECL_CONSTANT mechanism for defining exported constantsKevin O'Connor2016-12-231-1/+1
| | | | | | | | | Add a DECL_CONSTANT macro to allow the firmware to define constants that are to be exported to the host during the "identify" phase. This replaces the existing hardcoded mechanism of scanning the Kconfig header file for certain constants. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialhdl: Clear "hupcl" bit from serial portKevin O'Connor2016-12-091-1/+2
| | | | | | | | The arduino style serial port interfaces can reset the MCU when the serial port is opened. Clearing the HUPCL flag makes this less likely. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Detect if the communication channel to the firmware is lostKevin O'Connor2016-11-301-1/+1
| | | | | | Detect a comms loss and report it to the user. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Be careful to free memory allocated in C codeKevin O'Connor2016-11-301-3/+4
| | | | | | Free steppersync, stepcompress, and commandqueue objects. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialhdl: Retry opening of serial portKevin O'Connor2016-11-291-10/+27
| | | | | | | Continually retry to open the serial port. This helps with connecting to some micro-controllers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialhdl: Fully deallocate serialqueue on disconnectKevin O'Connor2016-11-291-2/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialhdl: Make SerialReader.send_with_response() blockingKevin O'Connor2016-11-291-10/+17
| | | | | | | Use the greenlet mechanism to wait for the response directly in the send_with_response() method. This simplifies the calling code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialhdl: Make SerialReader.connect() blockingKevin O'Connor2016-11-291-27/+26
| | | | | | | Use the greenlet mechanism to wait for the connection to come up in the serial connect() method. This simplifies the calling code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Run the MCU connect code within the reactorKevin O'Connor2016-11-291-4/+4
| | | | | | | | Setup the reactor and run the MCU connection code as a timer within the reactor. The connection code will make use of reactor greenlets so that it can wait for events during the connection phase. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialhdl: Calculate baudadjust from MCU's baud instead of host baudKevin O'Connor2016-07-161-8/+8
| | | | | | | Store the baud rate the MCU is configured for in the "identify" data and use that rate when calculating the baudadjust parameter. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialhdl: Avoid using 1200 baud during serial resetKevin O'Connor2016-06-141-1/+1
| | | | | | | The Arduino Due uses a 1200 baud connection to signal an erase sequence, so avoid it during normal serial resets. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Initial commit of source code.Kevin O'Connor2016-05-251-0/+286
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>