Minor compiler compatibility update for _delay_us().
This commit is contained in:
10
nuts_bolts.c
10
nuts_bolts.c
@@ -3,7 +3,8 @@
|
||||
Part of Grbl
|
||||
|
||||
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
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
@@ -43,3 +44,10 @@ void delay_ms(uint16_t ms)
|
||||
{
|
||||
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); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user