aboutsummaryrefslogtreecommitdiff
path: root/common/action_macro.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/action_macro.c')
-rw-r--r--common/action_macro.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/action_macro.c b/common/action_macro.c
index d85aee379..ba93fc8b2 100644
--- a/common/action_macro.c
+++ b/common/action_macro.c
@@ -14,10 +14,10 @@ GNU General Public License for more details.
14You should have received a copy of the GNU General Public License 14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>. 15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/ 16*/
17#include <util/delay.h>
18#include "action.h" 17#include "action.h"
19#include "action_util.h" 18#include "action_util.h"
20#include "action_macro.h" 19#include "action_macro.h"
20#include "wait.h"
21 21
22#ifdef DEBUG_ACTION 22#ifdef DEBUG_ACTION
23#include "debug.h" 23#include "debug.h"
@@ -28,7 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
28 28
29#ifndef NO_ACTION_MACRO 29#ifndef NO_ACTION_MACRO
30 30
31#define MACRO_READ() (macro = pgm_read_byte(macro_p++)) 31#define MACRO_READ() (macro = MACRO_GET(macro_p++))
32void action_macro_play(const macro_t *macro_p) 32void action_macro_play(const macro_t *macro_p)
33{ 33{
34 macro_t macro = END; 34 macro_t macro = END;
@@ -58,7 +58,7 @@ void action_macro_play(const macro_t *macro_p)
58 case WAIT: 58 case WAIT:
59 MACRO_READ(); 59 MACRO_READ();
60 dprintf("WAIT(%u)\n", macro); 60 dprintf("WAIT(%u)\n", macro);
61 { uint8_t ms = macro; while (ms--) _delay_ms(1); } 61 { uint8_t ms = macro; while (ms--) wait_ms(1); }
62 break; 62 break;
63 case INTERVAL: 63 case INTERVAL:
64 interval = MACRO_READ(); 64 interval = MACRO_READ();
@@ -77,7 +77,7 @@ void action_macro_play(const macro_t *macro_p)
77 return; 77 return;
78 } 78 }
79 // interval 79 // interval
80 { uint8_t ms = interval; while (ms--) _delay_ms(1); } 80 { uint8_t ms = interval; while (ms--) wait_ms(1); }
81 } 81 }
82} 82}
83#endif 83#endif