Minor compiler compatibility update for _delay_us().
This commit is contained in:
parent
24f1e0231e
commit
fbed795f47
4
limits.c
4
limits.c
@ -71,9 +71,9 @@ static void homing_cycle(bool x_axis, bool y_axis, bool z_axis, bool reverse_dir
|
|||||||
// Check if we are done
|
// Check if we are done
|
||||||
if(!(x_axis || y_axis || z_axis)) { return; }
|
if(!(x_axis || y_axis || z_axis)) { return; }
|
||||||
STEPPING_PORT |= out_bits & STEP_MASK;
|
STEPPING_PORT |= out_bits & STEP_MASK;
|
||||||
_delay_us(settings.pulse_microseconds);
|
delay_us(settings.pulse_microseconds);
|
||||||
STEPPING_PORT ^= out_bits & STEP_MASK;
|
STEPPING_PORT ^= out_bits & STEP_MASK;
|
||||||
_delay_us(step_delay);
|
delay_us(step_delay);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
Part of Grbl
|
Part of Grbl
|
||||||
|
|
||||||
Copyright (c) 2009-2011 Simen Svale Skogsrud
|
Copyright (c) 2009-2011 Simen Svale Skogsrud
|
||||||
|
Copyright (c) 2011-2012 Sungeun K. Jeon
|
||||||
|
|
||||||
Grbl is free software: you can redistribute it and/or modify
|
Grbl is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -43,3 +44,10 @@ void delay_ms(uint16_t ms)
|
|||||||
{
|
{
|
||||||
while ( ms-- ) { _delay_ms(1); }
|
while ( ms-- ) { _delay_ms(1); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Delays variable defined microseconds. Compiler compatibility fix for _delay_us(),
|
||||||
|
// which only accepts constants in future compiler releases.
|
||||||
|
void delay_us(uint16_t us)
|
||||||
|
{
|
||||||
|
while ( us-- ) { _delay_us(1); }
|
||||||
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
Part of Grbl
|
Part of Grbl
|
||||||
|
|
||||||
Copyright (c) 2009-2011 Simen Svale Skogsrud
|
Copyright (c) 2009-2011 Simen Svale Skogsrud
|
||||||
Copyright (c) 2011 Sungeun K. Jeon
|
Copyright (c) 2011-2012 Sungeun K. Jeon
|
||||||
|
|
||||||
Grbl is free software: you can redistribute it and/or modify
|
Grbl is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -45,4 +45,7 @@ int read_double(char *line, uint8_t *char_counter, double *double_ptr);
|
|||||||
// Delays variable-defined milliseconds. Compiler compatibility fix for _delay_ms().
|
// Delays variable-defined milliseconds. Compiler compatibility fix for _delay_ms().
|
||||||
void delay_ms(uint16_t ms);
|
void delay_ms(uint16_t ms);
|
||||||
|
|
||||||
|
// Delays variable-defined microseconds. Compiler compatibility fix for _delay_us().
|
||||||
|
void delay_us(uint16_t us);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user