Fix indentation, stepper.h dependency, etc.
This commit is contained in:
parent
f011a32771
commit
c613a1ed38
3 changed files with 148 additions and 149 deletions
|
@ -105,8 +105,6 @@ ring_buffer_r rx_buffer = { { 0 }, 0, 0 };
|
||||||
|
|
||||||
#if ENABLED(EMERGENCY_PARSER)
|
#if ENABLED(EMERGENCY_PARSER)
|
||||||
|
|
||||||
#include "../../module/stepper.h"
|
|
||||||
|
|
||||||
// Currently looking for: M108, M112, M410
|
// Currently looking for: M108, M112, M410
|
||||||
// If you alter the parser please don't forget to update the capabilities in Conditionals_post.h
|
// If you alter the parser please don't forget to update the capabilities in Conditionals_post.h
|
||||||
|
|
||||||
|
@ -213,14 +211,14 @@ FORCE_INLINE void store_rxd_char() {
|
||||||
else if (!++rx_dropped_bytes) ++rx_dropped_bytes;
|
else if (!++rx_dropped_bytes) ++rx_dropped_bytes;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
|
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
|
||||||
// calculate count of bytes stored into the RX buffer
|
// calculate count of bytes stored into the RX buffer
|
||||||
ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(rx_buffer.head - rx_buffer.tail) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
|
ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(rx_buffer.head - rx_buffer.tail) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
|
||||||
// Keep track of the maximum count of enqueued bytes
|
// Keep track of the maximum count of enqueued bytes
|
||||||
NOLESS(rx_max_enqueued, rx_count);
|
NOLESS(rx_max_enqueued, rx_count);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(SERIAL_XON_XOFF)
|
#if ENABLED(SERIAL_XON_XOFF)
|
||||||
|
|
||||||
// for high speed transfers, we can use XON/XOFF protocol to do
|
// for high speed transfers, we can use XON/XOFF protocol to do
|
||||||
// software handshake and avoid overruns.
|
// software handshake and avoid overruns.
|
||||||
|
@ -263,11 +261,11 @@ FORCE_INLINE void store_rxd_char() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // SERIAL_XON_XOFF
|
#endif // SERIAL_XON_XOFF
|
||||||
|
|
||||||
#if ENABLED(EMERGENCY_PARSER)
|
#if ENABLED(EMERGENCY_PARSER)
|
||||||
emergency_parser(c);
|
emergency_parser(c);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TX_BUFFER_SIZE > 0
|
#if TX_BUFFER_SIZE > 0
|
||||||
|
@ -296,7 +294,7 @@ FORCE_INLINE void store_rxd_char() {
|
||||||
HWUART->UART_IDR = UART_IDR_TXRDY;
|
HWUART->UART_IDR = UART_IDR_TXRDY;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // TX_BUFFER_SIZE
|
#endif // TX_BUFFER_SIZE > 0
|
||||||
|
|
||||||
static void UART_ISR(void) {
|
static void UART_ISR(void) {
|
||||||
uint32_t status = HWUART->UART_SR;
|
uint32_t status = HWUART->UART_SR;
|
||||||
|
@ -427,15 +425,16 @@ void MarlinSerial::flush(void) {
|
||||||
rx_buffer.head = rx_buffer.tail;
|
rx_buffer.head = rx_buffer.tail;
|
||||||
CRITICAL_SECTION_END;
|
CRITICAL_SECTION_END;
|
||||||
|
|
||||||
#if ENABLED(SERIAL_XON_XOFF)
|
#if ENABLED(SERIAL_XON_XOFF)
|
||||||
if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XOFF_CHAR) {
|
if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XOFF_CHAR) {
|
||||||
xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
|
xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
|
||||||
writeNoHandshake(XON_CHAR);
|
writeNoHandshake(XON_CHAR);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TX_BUFFER_SIZE > 0
|
#if TX_BUFFER_SIZE > 0
|
||||||
|
|
||||||
uint8_t MarlinSerial::availableForWrite(void) {
|
uint8_t MarlinSerial::availableForWrite(void) {
|
||||||
CRITICAL_SECTION_START;
|
CRITICAL_SECTION_START;
|
||||||
const uint8_t h = tx_buffer.head, t = tx_buffer.tail;
|
const uint8_t h = tx_buffer.head, t = tx_buffer.tail;
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
* G32 - Undock sled (Z_PROBE_SLED only)
|
* G32 - Undock sled (Z_PROBE_SLED only)
|
||||||
* G33 - Delta Auto-Calibration (Requires DELTA_AUTO_CALIBRATION)
|
* G33 - Delta Auto-Calibration (Requires DELTA_AUTO_CALIBRATION)
|
||||||
* G38 - Probe in any direction using the Z_MIN_PROBE (Requires G38_PROBE_TARGET)
|
* G38 - Probe in any direction using the Z_MIN_PROBE (Requires G38_PROBE_TARGET)
|
||||||
* G42 - Coordinated move to a mesh point (Requires HAS_MESH)
|
* G42 - Coordinated move to a mesh point (Requires MESH_BED_LEVELING, AUTO_BED_LEVELING_BLINEAR, or AUTO_BED_LEVELING_UBL)
|
||||||
* G90 - Use Absolute Coordinates
|
* G90 - Use Absolute Coordinates
|
||||||
* G91 - Use Relative Coordinates
|
* G91 - Use Relative Coordinates
|
||||||
* G92 - Set current position to coordinates given
|
* G92 - Set current position to coordinates given
|
||||||
|
|
|
@ -54,13 +54,6 @@
|
||||||
#define SERVO2_PIN 24 // Motor header MX3
|
#define SERVO2_PIN 24 // Motor header MX3
|
||||||
#define SERVO3_PIN 5 // PWM header pin 5
|
#define SERVO3_PIN 5 // PWM header pin 5
|
||||||
|
|
||||||
//
|
|
||||||
// Z Probe (when not Z_MIN_PIN)
|
|
||||||
//
|
|
||||||
#ifndef Z_MIN_PROBE_PIN
|
|
||||||
#define Z_MIN_PROBE_PIN 30
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Limit Switches
|
// Limit Switches
|
||||||
//
|
//
|
||||||
|
@ -71,6 +64,13 @@
|
||||||
#define Z_MIN_PIN 10
|
#define Z_MIN_PIN 10
|
||||||
#define Z_MAX_PIN 30
|
#define Z_MAX_PIN 30
|
||||||
|
|
||||||
|
//
|
||||||
|
// Z Probe (when not Z_MIN_PIN)
|
||||||
|
//
|
||||||
|
#ifndef Z_MIN_PROBE_PIN
|
||||||
|
#define Z_MIN_PROBE_PIN 30
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// Steppers
|
// Steppers
|
||||||
//
|
//
|
||||||
|
|
Reference in a new issue