diff --git a/grbl/planner.h b/grbl/planner.h index 306f9d91..ac892541 100644 --- a/grbl/planner.h +++ b/grbl/planner.h @@ -60,7 +60,12 @@ typedef struct { // NOTE: Used by stepper algorithm to execute the block correctly. Do not alter these values. uint32_t steps[N_AXIS]; // Step count along each axis uint32_t step_event_count; // The maximum step axis count and number of steps required to complete this block. - uint16_t direction_bits; // The direction bit set for this block (refers to *_DIRECTION_BIT in config.h) + + #ifdef STM32F103C8 + uint16_t direction_bits; // The direction bit set for this block (refers to *_DIRECTION_BIT in config.h) + #else + uint8_t direction_bits; // The direction bit set for this block (refers to *_DIRECTION_BIT in config.h) + #endif // Block condition data to ensure correct execution depending on states and overrides. uint8_t condition; // Block bitflag variable defining block run conditions. Copied from pl_line_data. diff --git a/grbl/spindle_control.c b/grbl/spindle_control.c index 4e18cf86..b234a7fe 100644 --- a/grbl/spindle_control.c +++ b/grbl/spindle_control.c @@ -107,7 +107,12 @@ void spindle_init() uint8_t spindle_get_state() { - uint16_t pin = 0; + #if defined (STM32F103C8) + uint16_t pin = 0; + #else + uint8_t pin = 0; + #endif + #ifdef VARIABLE_SPINDLE #ifdef USE_SPINDLE_DIR_AS_ENABLE_PIN #ifdef AVRTARGET @@ -116,7 +121,7 @@ uint8_t spindle_get_state() #if defined (STM32F103C8) pin = GPIO_ReadInputData(SPINDLE_ENABLE_PORT); #endif - // No spindle direction output pin. + // No spindle direction output pin. #ifdef INVERT_SPINDLE_ENABLE_PIN if (bit_isfalse(pin,(1<spindle_pwm); #endif