Various cleanups ahead of digipot save

This commit is contained in:
Scott Lahteine
2017-06-24 22:23:45 -05:00
parent ece89bcf7a
commit 3c7bfe798d
5 changed files with 36 additions and 27 deletions

View File

@ -93,8 +93,8 @@ class Stepper {
private:
static unsigned char last_direction_bits; // The next stepping-bits to be output
static unsigned int cleaning_buffer_counter;
static uint8_t last_direction_bits; // The next stepping-bits to be output
static uint16_t cleaning_buffer_counter;
#if ENABLED(Z_DUAL_ENDSTOPS)
static bool locked_z_motor, locked_z2_motor;
@ -243,20 +243,20 @@ class Stepper {
static FORCE_INLINE bool motor_direction(AxisEnum axis) { return TEST(last_direction_bits, axis); }
#if HAS_DIGIPOTSS || HAS_MOTOR_CURRENT_PWM
static void digitalPotWrite(int address, int value);
static void digipot_current(uint8_t driver, int current);
static void digitalPotWrite(const int16_t address, const int16_t value);
static void digipot_current(const uint8_t driver, const int16_t current);
#endif
#if HAS_MICROSTEPS
static void microstep_ms(uint8_t driver, int8_t ms1, int8_t ms2);
static void microstep_mode(uint8_t driver, uint8_t stepping);
static void microstep_ms(const uint8_t driver, const int8_t ms1, const int8_t ms2);
static void microstep_mode(const uint8_t driver, const uint8_t stepping);
static void microstep_readings();
#endif
#if ENABLED(Z_DUAL_ENDSTOPS)
static FORCE_INLINE void set_homing_flag(bool state) { performing_homing = state; }
static FORCE_INLINE void set_z_lock(bool state) { locked_z_motor = state; }
static FORCE_INLINE void set_z2_lock(bool state) { locked_z2_motor = state; }
static FORCE_INLINE void set_homing_flag(const bool state) { performing_homing = state; }
static FORCE_INLINE void set_z_lock(const bool state) { locked_z_motor = state; }
static FORCE_INLINE void set_z2_lock(const bool state) { locked_z2_motor = state; }
#endif
#if ENABLED(BABYSTEPPING)